aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2003-09-06 23:17:17 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2003-09-06 23:17:17 +0000
commit99b17f25b15f91bbb5399927450ed8717c09ad61 (patch)
tree4f6447501b2a03b0172f4dd94d5216ee7bf1635f
parent203504d9109f301578c5feac9e488beb951454c5 (diff)
downloadffmpeg-99b17f25b15f91bbb5399927450ed8717c09ad61.tar.gz
some fixes
Originally committed as revision 2214 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/nut.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 34cb644649..f08ec325a8 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -236,7 +236,7 @@ static int nut_write_header(AVFormatContext *s)
put_packetheader(nut, bc, 120);
put_be64(bc, STREAM_STARTCODE);
- put_v(bc, s->streams[i]->index);
+ put_v(bc, i /*s->streams[i]->index*/);
put_v(bc, (codec->codec_type == CODEC_TYPE_AUDIO) ? 32 : 0);
if (codec->codec_tag)
put_b(bc, &codec->codec_tag, 4);
@@ -310,7 +310,9 @@ static int nut_write_header(AVFormatContext *s)
}
/* encoder */
put_v(bc, 9); /* type */
- put_b(bc, LIBAVFORMAT_IDENT, strlen(LIBAVFORMAT_IDENT));
+ put_b(bc, LIBAVFORMAT_IDENT "\0", strlen(LIBAVFORMAT_IDENT));
+
+ put_v(bc, 0); /* eof info */
put_be32(bc, 0); /* FIXME: checksum */
update_packetheader(nut, bc, 0);
@@ -351,7 +353,7 @@ static int nut_write_packet(AVFormatContext *s, int stream_index,
put_byte(bc, flags);
put_v(bc, stream_index);
- put_s(bc, 0); /* lsb_timestamp */
+ put_s(bc, force_pts); /* lsb_timestamp */
update_packetheader(nut, bc, size);
put_buffer(bc, buf, size);
@@ -571,7 +573,7 @@ static AVOutputFormat nut_oformat = {
#elif defined(CONFIG_MP3LAME)
CODEC_ID_MP3LAME,
#else
- CODEC_ID_MP2,
+ CODEC_ID_AC3,
#endif
CODEC_ID_MPEG4,
nut_write_header,