Commit e692fd60 authored by Alex Beregszaszi's avatar Alex Beregszaszi

fixed codec specific data headers

Originally committed as revision 2337 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent cf246283
/* /*
* NUT (de)muxer based on initial draft * "NUT" Container Format muxer and demuxer (DRAFT-20031003)
* Copyright (c) 2003 Alex Beregszaszi * Copyright (c) 2003 Alex Beregszaszi
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -18,19 +18,18 @@ ...@@ -18,19 +18,18 @@
* *
* NUT DRAFT can be found in MPlayer CVS at DOCS/tech/mpcf.txt * NUT DRAFT can be found in MPlayer CVS at DOCS/tech/mpcf.txt
* *
* Compatible with draft version 20030906 * AND http://people.fsn.hu/~alex/nut/ (TeX, pdf, ps, dvi, ..)
* *
*/ */
/* /*
* TODO: * TODO:
* - checksumming * - checksumming
* - correct timestamp handling * - optimal timestamp handling
* - index writing * - index writing
* - info and index packet reading support * - info and index packet reading support
* - startcode searching for broken streams * - startcode searching for broken streams
* - subpacket support * - subpacket support
* - handling of codec specific headers
*/ */
//#define DEBUG 1 //#define DEBUG 1
...@@ -92,8 +91,7 @@ static int get_b(ByteIOContext *bc, char *data, int maxlen) ...@@ -92,8 +91,7 @@ static int get_b(ByteIOContext *bc, char *data, int maxlen)
for (i = 0; i < len && i < maxlen; i++) for (i = 0; i < len && i < maxlen; i++)
data[i] = get_byte(bc); data[i] = get_byte(bc);
/* skip remaining bytes */ /* skip remaining bytes */
for (; i < len; i++) url_fskip(bc, len-i);
get_byte(bc);
return 0; return 0;
} }
...@@ -106,8 +104,7 @@ static int get_bi(ByteIOContext *bc) ...@@ -106,8 +104,7 @@ static int get_bi(ByteIOContext *bc)
for (i = 0; i < len && i <= 4; i++) for (i = 0; i < len && i <= 4; i++)
val |= get_byte(bc) << (i * 8); val |= get_byte(bc) << (i * 8);
/* skip remaining bytes */ /* skip remaining bytes */
for (; i < len; i++) url_fskip(bc, len-i);
get_byte(bc);
return val; return val;
} }
...@@ -474,8 +471,10 @@ static int nut_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -474,8 +471,10 @@ static int nut_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_v(bc); /* FIXME: msb timestamp base */ get_v(bc); /* FIXME: msb timestamp base */
get_v(bc); /* shuffle type */ get_v(bc); /* shuffle type */
get_byte(bc); /* flags */ get_byte(bc); /* flags */
get_v(bc); /* FIXME: codec specific data headers */ /* codec specific data headers */
while(get_v(bc) != 0)
url_fskip(bc, get_v(bc));
if (class == 0) /* VIDEO */ if (class == 0) /* VIDEO */
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment