[FFmpeg-cvslog] libavformat/mov: Elimitate double reading of COVR metadata if MOV_EXPORT_ALL_METADATA is enabled

Alex Sukhanov git at videolan.org
Thu May 15 04:46:59 CEST 2014


ffmpeg | branch: master | Alex Sukhanov <alx.sukhanov at gmail.com> | Wed May 14 12:10:16 2014 -0700| [8b96f31817be57f0542834e7d6bdaecf2db6fd50] | committer: Michael Niedermayer

libavformat/mov: Elimitate double reading of COVR metadata if MOV_EXPORT_ALL_METADATA is enabled

Problem: ffmpeg tries to read COVR atom data twice if MOV_EXPORT_ALL_METADATA is enabled.
If COVR atom is the last in the stream, a parsing of such file fails.

Solution: just return immediatelly after mov_read_covr

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ff85a1f..b0500d9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -295,8 +295,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
                 int ret = mov_read_covr(c, pb, data_type, str_size);
                 if (ret < 0) {
                     av_log(c->fc, AV_LOG_ERROR, "Error parsing cover art.\n");
-                    return ret;
                 }
+                return ret;
             }
         } else return 0;
     } else if (atom.size > 4 && key && !c->itunes_metadata) {



More information about the ffmpeg-cvslog mailing list