[Ffmpeg-cvslog] CVS: ffmpeg/libavformat mov.c,1.92,1.93
Roberto Togni CVS
rtognimp
Tue Oct 18 22:16:45 CEST 2005
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg/doc ffmpeg-doc.texi,1.96,1.97
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec Makefile, 1.205, 1.206 allcodecs.c, 1.111, 1.112 avcodec.h, 1.424, 1.425 mpegaudio.c, 1.23, 1.24 mpegaudio.h, 1.8, 1.9 mpegaudiodec.c, 1.61, 1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv4913/libavformat
Modified Files:
mov.c
Log Message:
QDM2 compatible decoder
Index: mov.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- mov.c 6 Sep 2005 22:50:58 -0000 1.92
+++ mov.c 18 Oct 2005 20:16:43 -0000 1.93
@@ -145,6 +145,7 @@
{ CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */
{ CODEC_ID_AC3, MKTAG('m', 's', 0x20, 0x00) }, /* Dolby AC-3 */
{ CODEC_ID_ALAC,MKTAG('a', 'l', 'a', 'c') }, /* Apple Lossless */
+ { CODEC_ID_QDM2,MKTAG('Q', 'D', 'M', '2') }, /* QDM2 */
{ CODEC_ID_NONE, 0 },
};
@@ -709,6 +710,27 @@
return 0;
}
+static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
+{
+ AVStream *st = c->fc->streams[c->fc->nb_streams-1];
+
+ if((uint64_t)atom.size > (1<<30))
+ return -1;
+
+ // pass all frma atom to codec, needed at least for QDM2
+ av_free(st->codec->extradata);
+ st->codec->extradata_size = atom.size;
+ st->codec->extradata = (uint8_t*) av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+
+ if (st->codec->extradata) {
+ get_buffer(pb, st->codec->extradata, atom.size);
+ //av_log(NULL, AV_LOG_DEBUG, "Reading frma %Ld %s\n", atom.size, (char*)st->codec->extradata);
+ } else
+ url_fskip(pb, atom.size);
+
+ return 0;
+}
+
static int mov_read_avcC(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
@@ -1605,7 +1627,7 @@
{ MKTAG( 'u', 'r', 'n', ' ' ), mov_read_leaf },
{ MKTAG( 'u', 'u', 'i', 'd' ), mov_read_leaf },
{ MKTAG( 'v', 'm', 'h', 'd' ), mov_read_leaf }, /* video media info header */
-{ MKTAG( 'w', 'a', 'v', 'e' ), mov_read_default },
+{ MKTAG( 'w', 'a', 'v', 'e' ), mov_read_wave },
/* extra mp4 */
{ MKTAG( 'M', 'D', 'E', 'S' ), mov_read_leaf },
/* QT atoms */
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg/doc ffmpeg-doc.texi,1.96,1.97
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec Makefile, 1.205, 1.206 allcodecs.c, 1.111, 1.112 avcodec.h, 1.424, 1.425 mpegaudio.c, 1.23, 1.24 mpegaudio.h, 1.8, 1.9 mpegaudiodec.c, 1.61, 1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ffmpeg-cvslog
mailing list