X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmov.c;h=c14e3c15e51774e791a4308b48ba2d8675d34b97;hb=5333e0dd66c5695fc708bc9d7af4bf8750674b8f;hp=834969a6e96b82e371c564d72ba4645d225ff961;hpb=d808dce4a98f86be210d334185cacb662fbb20c2;p=ffmpeg diff --git a/libavformat/mov.c b/libavformat/mov.c index 834969a6e96..c14e3c15e51 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1536,6 +1536,10 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb, // force sample rate for qcelp when not stored in mov if (st->codec->codec_tag != MKTAG('Q','c','l','p')) st->codec->sample_rate = 8000; + // FIXME: Why is the following needed for some files? + sc->samples_per_frame = 160; + if (!sc->bytes_per_frame) + sc->bytes_per_frame = 35; break; case AV_CODEC_ID_AMR_NB: st->codec->channels = 1; @@ -1568,11 +1572,7 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb, } break; case AV_CODEC_ID_AC3: - st->need_parsing = AVSTREAM_PARSE_FULL; - break; case AV_CODEC_ID_MPEG1VIDEO: - st->need_parsing = AVSTREAM_PARSE_FULL; - break; case AV_CODEC_ID_VC1: st->need_parsing = AVSTREAM_PARSE_FULL; break; @@ -1927,7 +1927,8 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) /* sample_duration < 0 is invalid based on the spec */ if (sample_duration < 0) { - av_log(c->fc, AV_LOG_ERROR, "Invalid SampleDelta in STTS %d\n", sample_duration); + av_log(c->fc, AV_LOG_ERROR, "Invalid SampleDelta %d in STTS, at %d st:%d\n", + sample_duration, i, c->fc->nb_streams-1); sample_duration = 1; } if (sample_count < 0) {