[mythtv] [mythtv-commits] Ticket #2556: Bogus video streams in output PMT
Stuart Auchterlonie
stuarta at squashedfrog.net
Thu Oct 12 21:10:50 UTC 2006
On Thu, Oct 12, 2006 at 09:49:37PM +0100, Neil Murphy wrote:
> >
> > The MHEG application selects a stream by its component tag and calls
> > SetAudioByComponentTag or SetVideoByComponentTag to do this. The reason
> > for using component tags is that PIDs could change as a result of
> > remultiplexing so it isn't a good idea to have a PID in an MHEG app. As
> > far as I know there is no standard numbering for the tags. They are
> > just arbitrary values. The streams, though, are marked as private data
> > in the PMT. The complicated part is to present the information to
> > avformatdecoder so that SetAudioByComponentTag and
> > SetVideoByComponentTag will work. The only way I could see to do this
> > was to try to predict which could be audio and which video within
> > mpegts.c and then include them in the available streams. It would
> > certainly be better to drive this from the other end and only treat a
> > stream as, say, audio, once SetAudioByComponentTag was called. I just
> > couldn't see how to do that.
> >
> > If this is the source of the problem it could be that the problem is the
> > selection of the default video and audio streams is wrong.
> >
>
> It certainly seems to be. I've just tried the following hack and I now
> have channel-4 working again!
I take it that it doesn't work without this patch applied?
Stuart
>
> fnm at saruman:/usr/src/mythtv_svn/mythtv> svn diff
> Index: libs/libmythtv/avformatdecoder.cpp
> ===================================================================
> --- libs/libmythtv/avformatdecoder.cpp (revision 11515)
> +++ libs/libmythtv/avformatdecoder.cpp (working copy)
> @@ -1351,9 +1351,9 @@
> enc->decode_cc_dvd = decode_cc_dvd;
>
> // Set the default stream to the stream
> - // with the lowest component tag.
> + // with the highest component tag.
> if (selectedVideoIndex < 0 ||
> - ic->streams[i]->component_tag <
> + ic->streams[i]->component_tag >
> ic->streams[selectedVideoIndex]->component_tag)
> {
> selectedVideoIndex = i;
>
> Neil.
>
> > >
>
> > David.
> >
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
More information about the mythtv-dev
mailing list