[Ffmpeg-devel] support for hddvd .evo files (mpg ps variant) in ffmpeg
Michael Niedermayer
michaelni
Wed Jan 17 10:53:46 CET 2007
Hi
On Tue, Jan 16, 2007 at 12:05:09PM +0000, Ian Caulfield wrote:
> I've attached an initial patch to support demuxing EVOBs - it will recognise
> and demux VC-1 and DD+ streams, although neither will play at the moment
> (AC3 streams with substream_id 0xCx should be fine though).
>
> I haven't told it to flag video streams 0xE2 and 0xE3 as H264, since I
> thought that might break program streams using those ids for MPEG2 video.
>
> Ian
some comments, though mpeg-(de)muxer maintainer is mans his awnser matters
[...]
> @@ -1539,6 +1578,54 @@
> header_len -= 10;
> len -= 10;
> }
> + if ((flags & 0x01) == 0x01) { /* PES extension */
if(flags & 0x01) is more readable IMHO
[...]
> + if ((pes_ext & 0x80) == 0x80) { /* PES private data */
> + if (header_len < 16)
> + goto redo;
> + url_fskip(&s->pb, 16);
> + header_len -= 16;
> + len -= 16;
> + }
> + if ((pes_ext & 0x40) == 0x40) { /* pack header - should be zero in PS */
> + goto redo;
> + }
> + if ((pes_ext & 0x20) == 0x20) { /* program packet sequence counter */
> + if (header_len < 2)
> + goto redo;
> + url_fskip(&s->pb, 2);
> + header_len -= 2;
> + len -= 2;
> + }
> + if ((pes_ext & 0x10) == 0x10) { /* P-STD buffer */
> + if (header_len < 2)
> + goto redo;
> + url_fskip(&s->pb, 2);
> + header_len -= 2;
> + len -= 2;
> + }
skip= (pes_ext>>4) & 0xB;
skip+= skip & 0x9;
if (header_len < skip)
goto redo;
url_fskip(&s->pb, skip);
header_len -= skip;
len -= skip;
and i hate the if()goto header_len-=X len-=X mess but its already used
in mpeg.c so simplifying this belongs to a seperate change (one ill probably
do soon)
> + if ((pes_ext & 0x01) == 0x01) { /* PES extension 2 */
> + if (header_len < 1)
> + goto redo;
> + ext2_len = get_byte(&s->pb);
> + header_len--;
> + len--;
> + if ((ext2_len & 0x7f) > 0)
> + {
{ placement doesnt match the other code
[...]
> @@ -1553,7 +1640,7 @@
> goto redo;
> startcode = get_byte(&s->pb);
> len--;
> - if (startcode >= 0x80 && startcode <= 0xbf) {
> + if (startcode >= 0x80 && startcode <= 0xcf) {
> /* audio: skip header */
> if (len < 3)
> goto redo;
> @@ -1641,15 +1728,22 @@
> } else if (startcode >= 0x80 && startcode <= 0x87) {
> type = CODEC_TYPE_AUDIO;
> codec_id = CODEC_ID_AC3;
> - } else if (startcode >= 0x88 && startcode <= 0x9f) {
> + } else if ((startcode >= 0x88 && startcode <= 0x8f)
> + || (startcode >= 0x98 && startcode <= 0x9f)) {
and what is 0x90 .. 0x97 ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No evil is honorable: but death is honorable; therefore death is not evil.
-- Citium Zeno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070117/c9e53250/attachment.pgp>
More information about the ffmpeg-devel
mailing list