[MPlayer-dev-eng] Crash in update_subtitles when audio only stream but with subtitles

Gianluigi Tiesi mplayer at netfarm.it
Sun Feb 14 03:15:36 CET 2010


On Sat, Feb 13, 2010 at 12:28:39PM +0100, Reimar D?ffinger wrote:
> On Sat, Feb 13, 2010 at 12:08:27PM +0100, Gianluigi Tiesi wrote:
> > On Sat, Feb 13, 2010 at 12:05:48PM +0100, Gianluigi Tiesi wrote:
> > > When an audio only clip (or the vo/vc failed to init)
> > > 
> > > mplayer tries to update anyway subtitles:
> > > 
> > > at line 3776:
> > > update_subtitles(NULL, a_pos, mpctx->d_sub, 0);
> > > 
> > > in "/*========================== PLAY AUDIO ============================*/"
> > > 
> > > in mpcommon.c:
> > > void update_subtitles(sh_video_t *sh_video, double refpts, demux_stream_t *d_dvdsub, int reset)
> > > ...
> > > 
> > >         spudec_heartbeat(vo_spudec, 90000*sh_video->timer);
> > > 
> > > but sh_video is NULL
> > > 
> > 
> > I think there is no point to:
> >   update_subtitles(NULL, a_pos, mpctx->d_sub, 0);
> >   update_osd_msg();
> > 
> > when mpctx->sh_video is NULL
> > I don't known about gui (if osd msg can be updated anyway)
> 
> OSD and subtitles are displayed on the command line, so this is certainly not
> pointless.
> And when sh_video is NULL, vo_spudec is _supposed_ to be NULL as well and thus this
> whole code should be skipped.
> So a proper bugreport would be useful, while I can reproduce a crash, it already
> crashes at mplayer.c:1168 for me.

3159:

      vo_vobsub=vobsub_open(buf,spudec_ifo,0,&vo_spudec);

this inits vo_spudec

the problem occurs when a video decoder fails the init
(that is not done here)

vo_spudec will be not NULL
but mpctx->sh_video is NULL

obiviously you need subtitles for the played movie

an example is loading binary codecs, in my particular case
I have vd_dnative (a vd I'm coding), if the binary codec does not
accepts input, the init fails

Regards


-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/



More information about the MPlayer-dev-eng mailing list