From: Michael Niedermayer <mich...@niedermayer.cc> Fixes Ticket5047
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavformat/isom.h | 1 + libavformat/mov.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/libavformat/isom.h b/libavformat/isom.h index 65a64d4..255efd1 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -188,6 +188,7 @@ typedef struct MOVContext { MOVTrackExt *trex_data; unsigned trex_count; int itunes_metadata; ///< metadata are itunes style + int handbrake_version; int chapter_track; int use_absolute_path; int ignore_editlist; diff --git a/libavformat/mov.c b/libavformat/mov.c index 03aca0f..70be5d6 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -447,6 +447,12 @@ retry: snprintf(key2, sizeof(key2), "%s-%s", key, language); av_dict_set(&c->fc->metadata, key2, str, 0); } + if (!strcmp(key, "encoder")) { + int major, minor, micro; + if (sscanf(str, "HandBrake %d.%d.%d", &major, &minor, µ) == 3) { + c->handbrake_version = 1000000*major + 1000*minor + micro; + } + } } av_log(c->fc, AV_LOG_TRACE, "lang \"%3s\" ", language); av_log(c->fc, AV_LOG_TRACE, "tag \"%s\" value \"%s\" atom \"%.4s\" %d %"PRId64"\n", @@ -4693,6 +4699,11 @@ static int mov_read_header(AVFormatContext *s) return err; } } + if (mov->handbrake_version && + mov->handbrake_version <= 1000000*0 + 1000*10 + 0 && + st->codec->codec_id == AV_CODEC_ID_MP3 + ) + st->need_parsing = AVSTREAM_PARSE_FULL; } if (mov->trex_data) { -- 1.7.9.5 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel