changeset 222:1da43d2bdcae libavformat

some fixes
author al3x
date Sat, 06 Sep 2003 23:17:17 +0000
parents fa80efcf8e39
children 848b612d0595
files nut.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/nut.c	Sat Sep 06 16:29:05 2003 +0000
+++ b/nut.c	Sat Sep 06 23:17:17 2003 +0000
@@ -236,7 +236,7 @@
 	
 	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 @@
     }
     /* 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 @@
 
     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 @@
 #elif defined(CONFIG_MP3LAME)
     CODEC_ID_MP3LAME,
 #else
-    CODEC_ID_MP2,
+    CODEC_ID_AC3,
 #endif
     CODEC_ID_MPEG4,
     nut_write_header,