[MPlayer-dev-eng] PATCH [4/12] CoreAVC support (Take 3)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Feb 28 20:39:23 CET 2007


Hello,
On Tue, Feb 27, 2007 at 12:41:48PM -0800, Alan Nisota wrote:
> >004avc1mov.patch: allow both 'avc1' and 'AVC1' streams to be processed

> Index: libmpdemux/demux_mov.c
> ===================================================================
> --- libmpdemux/demux_mov.c.orig	2007-02-15 09:42:47.000000000 -0800
> +++ libmpdemux/demux_mov.c	2007-02-15 09:43:25.000000000 -0800
> @@ -1267,7 +1267,8 @@
>  		}
>  		else
>  		{
> -		 if (trak->fourcc == mmioFOURCC('a','v','c','1')) {
> +		 if (trak->fourcc == mmioFOURCC('a','v','c','1') ||
> +                     trak->fourcc == mmioFOURCC('A','V','C','1')) {
>  		  if (trak->stream_header_len > 0xffffffff - sizeof(BITMAPINFOHEADER)) {
>  		    mp_msg(MSGT_DEMUXER, MSGL_ERR, "Invalid extradata size %d, skipping\n",trak->stream_header_len);
>  		    trak->stream_header_len = 0;

This seems wrong, since avc1 is supposed to be the only correct code for it.
Can you upload a sample? libavformat should probably changed, too (see
attached patch), am I right that -demuxer lavf works with this patch and
does not without?

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libavformat/mov.c
===================================================================
--- libavformat/mov.c	(revision 8161)
+++ libavformat/mov.c	(working copy)
@@ -105,6 +105,7 @@
     { CODEC_ID_MSRLE, MKTAG('W', 'R', 'L', 'E') },
     { CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */
     { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
+    { CODEC_ID_H264, MKTAG('A', 'V', 'C', '1') }, /* AVC-1/H.264 */
     { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 produced by Sony HD camera */
     { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* HDV produced by FCP */
     { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */


More information about the MPlayer-dev-eng mailing list