[MPlayer-dev-eng] [PATCH] add support for subtitles thru lavf

Aurelien Jacobs aurel at gnuage.org
Fri Jul 13 15:20:24 CEST 2007


On Fri, 13 Jul 2007 15:03:26 +0200
Nico Sabbi <nsabbi at email.it> wrote:

> Aurelien Jacobs wrote:
> 
> >Hi,
> >
> >The attached patch allows to display subtitles that are demuxed
> >by lavf.
> >Ok to apply ?
> >
> >Aurel
> >  
> >
> > 
> > extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
> >@@ -432,6 +435,17 @@
> >                 demuxer->video->sh= demuxer->v_streams[i];
> >             }
> >             break;}
> >+            sh_sub->type = 't';
> >+            demuxer->sub->sh = demuxer->s_streams[priv->sub_streams++];
> >+            break;}
> >         default:
> >             st->discard= AVDISCARD_ALL;
> >         }
> >@@ -481,6 +495,10 @@
> >             ds->sh=demux->v_streams[id];
> >             mp_msg(MSGT_DEMUX,MSGL_V,"Auto-selected LAVF video ID = %d\n",ds->id);
> >         }
> >+    } else if(id==demux->sub->id){
> >+        // subtitle
> >+        ds=demux->sub;
> >+        sub_utf8=1;
> >  
> >
> lavf demuxes dvd and dvb subtitles, too, that are definitively bitmaps, 
> not text.
> This particularity should be handled properly

Indeed, and I know this feature needs to be added too.
But for now I've only tried to support text subtitles, and this
is working nicely, so I think it's already worth to commit.

Aurel



More information about the MPlayer-dev-eng mailing list