[MPlayer-dev-eng] mplayer without video
Alban Bedel
albeu at free.fr
Mon Jan 14 13:20:03 CET 2002
On Mon, 14 Jan 2002 17:46:12 +0800
Sam Lin <itrs at softwell.com.tw> wrote:
> >On Sun, 13 Jan 2002 22:48:05 -0800
> >Bertrand Baudet <bertrand_baudet at yahoo.com> wrote:
> >Yesterday I look at this and I finnaly had success with audio only stream
> > (but not all are working). The problem is in the demuxer, it assume to found
> > first a video chunk. It was working with downloaded sample because
> > it load chunk until eof and then pass on audio and work. What is needed
> > is to do the ds_fill_buffer with video only if we found a video stream in
> > the header wich is currentlly assumed and not checked. Look in demuxer.c
> > the function wich open the demuxer I think it will be easyer to understand what
> > I'm trying to explain ;¡P).
> > Albeu
>
> So the solution is:
>
> --- main/libmpdemux/demuxer.c Thu Jan 10 13:56:16 2002
> +++ main-itrs/libmpdemux/demuxer.c Mon Jan 14 17:01:47 2002
> @@ -587,6 +587,7 @@
> stream_seek(demuxer->stream,demuxer->movi_start);
> // demuxer->idx_pos=0;
> // demuxer->endpos=avi_header.movi_end;
> + if(sh_video){
> if(!ds_fill_buffer(d_video)){
> mp_msg(MSGT_DEMUXER,MSGL_WARN,"ASF: " MSGTR_MissingVideoStream);
> sh_video=NULL;
> @@ -601,6 +602,7 @@
> sh_video->bih->biHeight,
> sh_video->bih->biBitCount);
> // sh_video->i_bps=10*asf_packetsize; // FIXME!
> + }
> }
> if(audio_id!=-2){
> mp_msg(MSGT_DEMUXER,MSGL_V,"ASF: Searching for audio stream (id:%d)\n",d_audio->id);
>
> END
>
> Is this right ?
I'am afraid not because I tried this and when there is a video stream it don't work anymore
because at this stage sh_video is always NULL. Look it's setted a few lines after. Here is a patch
wich work both with audio only and 'normal' audio/video stream. If you alredy have applied the other
one strip the part for mplayer.c and demux_avi.c (it's a cvs diff).
Albeu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: novideo.patch2
Type: application/octet-stream
Size: 5065 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020114/0e57b573/attachment.obj>
More information about the MPlayer-dev-eng
mailing list