[MPlayer-dev-eng] [PATCH] fix mencoder creates bad avi files when recording h264 in ts container from DVB
vladisslav at inbox.ru
Thu Jul 2 14:11:21 CEST 2009
From: Diego Biurrun <diego at biurrun.de>
To: mplayer-dev-eng at mplayerhq.hu
Date: Thu, 02 Jul 2009 13:40:20 +0200
Subject: Re: [MPlayer-dev-eng] [PATCH] fix mencoder creates bad avi files
when recording h264 in ts container from DVB
> On Thu, Jul 02, 2009 at 01:37:58PM +0200, Attila Kinali wrote:
> > On Thu, 11 Jun 2009 20:56:03 +0400
> > vladisslav vladisslav <vladisslav at inbox.ru> wrote:
> > > Simple patch originally written by Larry Reznick, http://email@example.com/msg09732.html fixes this problem:
> > >
> > > --- r29354/libmpdemux/video.c 2009-05-13 06:58:57.000000000 +0400
> > > +++ r29354-my/libmpdemux/video.c 2009-06-11 20:30:44.000000000 +0400
> > > @@ -235,6 +235,8 @@
> > > return 0;
> > > }
> > > h264_parse_sps(&picture, &(videobuffer[pos]), videobuf_len - pos);
> > > + sh_video->disp_w=picture.display_picture_width;
> > > + sh_video->disp_h=picture.display_picture_height;
> > Any comments on this patch?
> > It seems to be trival.
> Well, if you are confident and tested it thoroughly, apply..
I have used mplayer/mencoder (various svn builds) with this patch applied since January 2009 and got no problem. So i think it does not break anything. The only problem it fixes is that sh_video members disp_w and disp_h does not get set properly when demuxing h264 stream in ps/es/ts This is not a problem when playing or trancoding a stream (decoder sets disp_w and disp_h correctly), but invalid values (zero whdth/height) get written into resulting avi file header in '-ovc copy' mode. Mplayer plays such files correctly, but some other programs crashes. I can provide test case: source ts and resulting broken avi if megaupload/rapidshare/mediafire is ok. Files are large - has to be at least 30-40Mb to be playable...
More information about the MPlayer-dev-eng