[FFmpeg-cvslog] Print a warning instead of requesting a sample for an invalid exif tag.

Carl Eugen Hoyos git at videolan.org
Thu Jul 24 15:27:44 CEST 2014


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Jul 24 11:58:11 2014 +0200| [badcd3da81ac447d71c8d6d91bfaa3f49cd5ed6b] | committer: Carl Eugen Hoyos

Print a warning instead of requesting a sample for an invalid exif tag.

Fixes ticket #3792.
Reviewed-by: Thilo Borgmann

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=badcd3da81ac447d71c8d6d91bfaa3f49cd5ed6b
---

 libavcodec/exif.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index a980da2..fa30f05 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -47,6 +47,11 @@ static int exif_add_metadata(AVCodecContext *avctx, int count, int type,
                              AVDictionary **metadata)
 {
     switch(type) {
+    case 0:
+        av_log(avctx, AV_LOG_WARNING,
+               "Invalid TIFF tag type 0 found for %s with size %d\n",
+               name, count);
+        return 0;
     case TIFF_DOUBLE   : return ff_tadd_doubles_metadata(count, name, sep, gb, le, metadata);
     case TIFF_SSHORT   : return ff_tadd_shorts_metadata(count, name, sep, gb, le, 1, metadata);
     case TIFF_SHORT    : return ff_tadd_shorts_metadata(count, name, sep, gb, le, 0, metadata);



More information about the ffmpeg-cvslog mailing list