changeset 410:23a77d74efd0 libavformat

large extradata fix use 3 pts predictors for vorbis, slightly more efficient
author michael
date Sun, 04 Apr 2004 18:37:41 +0000
parents b6949d80b7a9
children 64c347065c1b
files nut.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/nut.c	Sun Apr 04 18:33:07 2004 +0000
+++ b/nut.c	Sun Apr 04 18:37:41 2004 +0000
@@ -203,7 +203,7 @@
             start2++;
         }
 #endif
-        pred_count= 2 + codec->has_b_frames;
+        pred_count= 2 + codec->has_b_frames + (codec->codec_id == CODEC_ID_VORBIS);
         for(pred=0; pred<pred_count; pred++){
             int start3= start2 + (end2-start2)*pred / pred_count;
             int end3  = start2 + (end2-start2)*(pred+1) / pred_count;
@@ -443,7 +443,7 @@
 	codec = &s->streams[i]->codec;
 	
 	put_be64(bc, STREAM_STARTCODE);
-	put_packetheader(nut, bc, 120);
+	put_packetheader(nut, bc, 120 + codec->extradata_size);
 	put_v(bc, i /*s->streams[i]->index*/);
 	put_v(bc, (codec->codec_type == CODEC_TYPE_AUDIO) ? 32 : 0);
 	if (codec->codec_tag)