[xiph-commits] r6939 - trunk/ffmpeg2theora

j at dactyl.lonelymoon.com j
Wed Jun 30 15:58:56 PDT 2004


Author: j
Date: Wed Jun 30 15:58:56 2004
New Revision: 6939

Modified:
trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
change audio decoding a bit, to get inline with ffmpeg

Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2004-06-30 22:54:40 UTC (rev 6938)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2004-06-30 22:58:55 UTC (rev 6939)
@@ -176,8 +176,8 @@
venc->width, venc->height,
frame_topBand, frame_bottomBand,
frame_leftBand, frame_rightBand,
-				      frame_padtop, frame_padbottom,
-				      frame_padleft, frame_padright
+									  frame_padtop, frame_padbottom,
+									  frame_padleft, frame_padright
);
#else
/* ffmpeg 0.48 */
@@ -190,7 +190,7 @@
#endif
fprintf(stderr,"  Resize: %dx%d => %dx%d\n",venc->width,venc->height,this->output_width,this->output_height);
}
-		else {
+		else{
this->output_height=venc->height;
this->output_width=venc->width;
}
@@ -369,11 +369,10 @@
int data_size;
while(len > 0 ){
len1 = avcodec_decode_audio(&astream->codec, audio_buf,&data_size, ptr, len);
-					if (len1 < 0 || data_size ==0) {
+					if (len1 < 0){
/* if error, we skip the frame */
break;
-            		}
-
+            		}
len -= len1;
ptr += len1;
if(data_size >0){
@@ -392,7 +391,6 @@
}
}
}
-
/* flush out the file */
theoraframes_flush ();
av_free_packet (&pkt);



More information about the commits mailing list