Skip to content

Do not allow non-content stream types to extend the format context's dur... #4337

Merged
merged 1 commit into from Mar 22, 2014

5 participants

@voguemaster

...ation as this

affects the UI and therefore seek capabilities.

DVB subtitle/teletext streams are private streams (stream type 0xBD) and may have their
own timebase or PTS values that are widely different than video stream's,
or not set properly. Regardless of any handling of such cases in FFmpeg, XBMC shouldn't
extend play duration unless an actual content stream has passed it's "end".

Eli K Do not allow non-content stream types to extend the format context's …
…duration as this

affects the UI and therefore seek capabilities.

DVB subtitle/teletext streams are private streams (stream type 0xBD) and may have their
own timebase or PTS values that are widely different than video stream's,
or not set properly. Regardless of any handling of such cases in FFmpeg, XBMC shouldn't
extend play duration unless an actual content stream has passed it's "end".
e0024d2
@voguemaster

This fixes the duration in the OSD menu jumping to high values, much higher than the stream's
duration. Happens with DVB recorded mpegts files from ArgusTV and tvheadend.
http://forum.xbmc.org/showthread.php?tid=187502

Fixes by #4317 do not help. The packet the is received by av_read_frame and contains a DVB subtitle frame will still cause the duration to spike.

@voguemaster voguemaster commented on the diff Mar 6, 2014
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -790,7 +790,8 @@ DemuxPacket* CDVDDemuxFFmpeg::Read()
// check if stream has passed full duration, needed for live streams
- if(m_pkt.pkt.dts != (int64_t)AV_NOPTS_VALUE)
+ bool bAllowDurationExt = (stream->codec && (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO || stream->codec->codec_type == AVMEDIA_TYPE_AUDIO));
@voguemaster
voguemaster added a note Mar 6, 2014

Using a bool here makes the purpose of the condition very clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@FernetMenta
Team Kodi member

makes sense only considering audio and video streams. I do it similar in vnsi.
Gotham material.

@FernetMenta FernetMenta added the Gotham label Mar 6, 2014
@voguemaster

This is probably a stupid question - What's vnsi?

@FernetMenta
Team Kodi member

VNSI is a PVR backend which extends vdr. It has it's own mpegts parser/demuxer.

@voguemaster

I know this is off-topic to the PR but why does it have it's own parser/demuxer?
Anywhere I can read about it?

@FernetMenta
Team Kodi member

vnsi and tv headend are optimized for pvr live tv. Having their own demuxers they have better control for i.e. lost signal, switching channesl, timeshift, convering teletext subs into text subs (tv headend), etc.
Open a thread on the forum if you want more info.

@jmarshallnz
Team Kodi member

@elupus please review.

@elupus
Team Kodi member
@t-nelson

jenkins build this please

@t-nelson t-nelson merged commit 6394381 into xbmc:master Mar 22, 2014

1 check passed

Details default Merged build #407 succeeded in 53 min
@t-nelson t-nelson removed the Gotham label Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.