[FFmpeg-devel] [PATCH]Support qclp in mov before stsd version 1, v2

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Jun 6 20:31:07 CEST 2013


On Thursday 06 June 2013 01:33:21 pm Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch fixes the following sample as reported by Compn on irc:
> http://web.archive.org/web/20071027002243/http://www.americaone.org/video/i
>mages/clip43qt3-hi.mov As the original patch, it does not break samples with
> variable frame size like h263.mov
> Contrary to the original patch, this patch does not break stsd version 1
> samples with bitrate < FULL.

This is not necessarily related to the stsd version, simpler patch attached.

Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1c03b15..763f5f9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1530,6 +1530,9 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
         if (st->codec->codec_tag != MKTAG('Q','c','l','p'))
             st->codec->sample_rate = 8000;
         st->codec->channels= 1; /* really needed */
+        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; /* really needed */


More information about the ffmpeg-devel mailing list