@@ -447,6 +447,12 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
447
447
snprintf (key2 , sizeof (key2 ), "%s-%s" , key , language );
448
448
av_dict_set (& c -> fc -> metadata , key2 , str , 0 );
449
449
}
450
+ if (!strcmp (key , "encoder" )) {
451
+ int major , minor , micro ;
452
+ if (sscanf (str , "HandBrake %d.%d.%d" , & major , & minor , & micro ) == 3 ) {
453
+ c -> handbrake_version = 1000000 * major + 1000 * minor + micro ;
454
+ }
455
+ }
450
456
}
451
457
av_log (c -> fc , AV_LOG_TRACE , "lang \"%3s\" " , language );
452
458
av_log (c -> fc , AV_LOG_TRACE , "tag \"%s\" value \"%s\" atom \"%.4s\" %d %" PRId64 "\n" ,
@@ -4693,6 +4699,13 @@ static int mov_read_header(AVFormatContext *s)
4693
4699
return err ;
4694
4700
}
4695
4701
}
4702
+ if (mov -> handbrake_version &&
4703
+ mov -> handbrake_version <= 1000000 * 0 + 1000 * 10 + 0 && // 0.10.0
4704
+ st -> codec -> codec_id == AV_CODEC_ID_MP3
4705
+ ) {
4706
+ av_log (s , AV_LOG_VERBOSE , "Forcing full parsing for mp3 stream\n" );
4707
+ st -> need_parsing = AVSTREAM_PARSE_FULL ;
4708
+ }
4696
4709
}
4697
4710
4698
4711
if (mov -> trex_data ) {
0 commit comments