[Mplayer-cvslog] CVS: main/libmpcodecs ad_ffmpeg.c,1.11,1.12

Arpi of Ize arpi at mplayerhq.hu
Sat Dec 28 01:40:14 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv25524

Modified Files:
	ad_ffmpeg.c 
Log Message:
ffmp2 (with mpeg files) sig11 fixed


Index: ad_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_ffmpeg.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ad_ffmpeg.c	4 Nov 2002 23:15:01 -0000	1.11
+++ ad_ffmpeg.c	28 Dec 2002 00:40:11 -0000	1.12
@@ -61,15 +61,17 @@
     lavc_context = avcodec_alloc_context();
     sh_audio->context=lavc_context;
 
-    lavc_context->channels = sh_audio->wf->nChannels;
-    lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec;
-    lavc_context->bit_rate = sh_audio->wf->nAvgBytesPerSec * 8;
+    if(sh_audio->wf){
+	lavc_context->channels = sh_audio->wf->nChannels;
+	lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec;
+	lavc_context->bit_rate = sh_audio->wf->nAvgBytesPerSec * 8;
+	lavc_context->block_align = sh_audio->wf->nBlockAlign;
+    }
     lavc_context->fourcc = sh_audio->format;
-    lavc_context->block_align = sh_audio->wf->nBlockAlign;
-    lavc_context->codec_id = lavc_codec->id;
+    lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
 
     /* alloc extra data */
-    if (sh_audio->wf->cbSize > 0) {
+    if (sh_audio->wf && sh_audio->wf->cbSize > 0) {
         lavc_context->extradata = malloc(sh_audio->wf->cbSize);
         lavc_context->extradata_size = sh_audio->wf->cbSize;
         memcpy(lavc_context->extradata, (char *)sh_audio->wf + sizeof(WAVEFORMATEX), 




More information about the MPlayer-cvslog mailing list