Commit badcd3da authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

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

Fixes ticket #3792.
Reviewed-by: Thilo Borgmann
parent f7539562
...@@ -47,6 +47,11 @@ static int exif_add_metadata(AVCodecContext *avctx, int count, int type, ...@@ -47,6 +47,11 @@ static int exif_add_metadata(AVCodecContext *avctx, int count, int type,
AVDictionary **metadata) AVDictionary **metadata)
{ {
switch(type) { 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_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_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); case TIFF_SHORT : return ff_tadd_shorts_metadata(count, name, sep, gb, le, 0, metadata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment