[MPlayer-users] Possible fix for broken h.264 in HDDVD playback

Nico Sabbi Nicola.Sabbi at poste.it
Thu Jan 17 10:45:06 CET 2008


Il Thursday 17 January 2008 10:21:58 Matthew Nichols ha scritto:
> So I figured out a fix for this issue (patch vs current SVN is
> attached). I'm not sure what the proper procedure is allow me to
> commit this fix, since I haven't contributed code to this project
> before.
>

[snip]

>
> mpeg_evob-h264fix-1.diff
>   Index: libavformat/mpeg.c
> ===================================================================
> --- libavformat/mpeg.c  (revision 11549)
> +++ libavformat/mpeg.c  (working copy)
> @@ -446,7 +446,7 @@
>          } else {
>              goto skip;
>          }
> -    } else if (startcode >= 0x1e0 && startcode <= 0x1ef) {
> +    } else if (startcode >= 0x1e0 && startcode <= 0x1e1) {
>          static const unsigned char avs_seqh[4] = { 0, 0, 1, 0xb0
> }; unsigned char buf[8];
>          get_buffer(s->pb, buf, 8);
> @@ -483,6 +483,9 @@
>      } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
>          type = CODEC_TYPE_VIDEO;
>          codec_id = CODEC_ID_VC1;
> +    } else if (startcode >= 0x1e2 && startcode <=0x1e3) {
> +        type = CODEC_TYPE_VIDEO;
> +        codec_id = CODEC_ID_H264;
>      } else {
>      skip:
>          /* skip packet */

a patch to libavformat belongs to ffmpeg-devel at mplayerhq.hu
but I can already tell you that the patch you posted is an ugly
hack that I would reject if I were the maintainer of that file:
it would compromise the playability of ordinary mpeg2 files
with vid == 0xe2 || vid == 0xe3.
Unfortunately there's no clean solution to this problem;
in demux_mpg I had to do a scan of the video stream to
determine the most likely codec used (scan activated
with -psprobe NNN)
Unfortunately there's n



More information about the MPlayer-users mailing list