Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dvdplayer: sub_id in ffmpeg has been depreciated and doesn't work

  • Loading branch information...
commit 8967acd26032c9daeec2f3a1656372eebb6647f5 1 parent 3d2b0a8
Joakim Plate elupus authored
1  xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
View
@@ -60,7 +60,6 @@ bool CDVDOverlayCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &optio
m_pCodecContext->debug_mv = 0;
m_pCodecContext->debug = 0;
m_pCodecContext->workaround_bugs = FF_BUG_AUTODETECT;
- m_pCodecContext->sub_id = hints.identifier;
m_pCodecContext->codec_tag = hints.codec_tag;
m_pCodecContext->time_base.num = 1;
m_pCodecContext->time_base.den = DVD_TIME_BASE;
3  xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
View
@@ -207,11 +207,8 @@ class CDemuxStreamSubtitle : public CDemuxStream
public:
CDemuxStreamSubtitle() : CDemuxStream()
{
- identifier = 0;
type = STREAM_SUBTITLE;
}
-
- int identifier;
};
class CDemuxStreamTeletext : public CDemuxStream
1  xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
View
@@ -1046,7 +1046,6 @@ void CDVDDemuxFFmpeg::AddStream(int iId)
{
CDemuxStreamSubtitleFFmpeg* st = new CDemuxStreamSubtitleFFmpeg(this, pStream);
m_streams[iId] = st;
- st->identifier = pStream->codec->sub_id;
if(m_dllAvUtil.av_dict_get(pStream->metadata, "title", NULL, 0))
st->m_description = m_dllAvUtil.av_dict_get(pStream->metadata, "title", NULL, 0)->value;
8 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp
View
@@ -316,7 +316,13 @@ void CDVDDemuxHTSP::SubscriptionStart (htsmsg_t *m)
uint32_t composition_id = 0, ancillary_id = 0;
htsmsg_get_u32(sub, "composition_id", &composition_id);
htsmsg_get_u32(sub, "ancillary_id" , &ancillary_id);
- st.s->identifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
+ if(composition_id || ancillary_id)
+ {
+ st.s->ExtraData = new uint8_t[4];
+ st.s->ExtraSize = 4;
+ ((uint16_t*)st.s->ExtraData)[0] = composition_id;
+ ((uint16_t*)st.s->ExtraData)[1] = ancillary_id;
+ }
} else if(!strcmp(type, "TEXTSUB")) {
st.s = new CDemuxStreamSubtitle();
st.s->codec = CODEC_ID_TEXT;
8 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp
View
@@ -419,7 +419,13 @@ void CDVDDemuxPVRClient::RequestStreams()
{
st = new CDemuxStreamSubtitlePVRClient(this);
}
- st->identifier = props.stream[i].iIdentifier;
+ if(props.stream[i].iIdentifier)
+ {
+ st->ExtraData = new uint8_t[4];
+ st->ExtraSize = 4;
+ ((uint16_t*)st->ExtraData)[0] = (props.stream[i].iIdentifier >> 0) & 0xFFFFu;
+ ((uint16_t*)st->ExtraData)[1] = (props.stream[i].iIdentifier >> 4) & 0xFFFFu;
+ }
m_streams[i] = st;
}
else
5 xbmc/cores/dvdplayer/DVDStreamInfo.cpp
View
@@ -67,7 +67,6 @@ void CDVDStreamInfo::Clear()
bitrate = 0;
bitspersample = 0;
- identifier = 0;
orientation = 0;
}
@@ -108,7 +107,6 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, bool withextradata)
|| bitspersample != right.bitspersample ) return false;
// SUBTITLE
- if( identifier != right.identifier ) return false;
return true;
}
@@ -166,7 +164,6 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)
bitspersample = right.bitspersample;
// SUBTITLE
- identifier = right.identifier;
}
void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)
@@ -211,7 +208,5 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)
}
else if( right.type == STREAM_SUBTITLE )
{
- const CDemuxStreamSubtitle *stream = static_cast<const CDemuxStreamSubtitle*>(&right);
- identifier = stream->identifier;
}
}
1  xbmc/cores/dvdplayer/DVDStreamInfo.h
View
@@ -83,7 +83,6 @@ class CDVDStreamInfo
int bitspersample;
// SUBTITLE
- int identifier;
// CODEC EXTRADATA
void* extradata; // extra data for codec to use

12 comments on commit 8967acd

Sam Stenvall
Collaborator

I just spent an eternity bisecting and came to the conclusion that this is the commit that broke subtitles (both DVB and teletext) when watching live TV.

References:

http://forum.xbmc.org/showthread.php?tid=169386
http://trac.xbmc.org/ticket/14520

Joakim Plate
Collaborator

are you running external ffmpeg perhaps?

Sam Stenvall
Collaborator

No, I'm not crazy :-) If it matters, I configure XBMC with this script:

#!/bin/sh

./configure --disable-joystick --disable-ssh --disable-nfs \
--disable-airplay --disable-upnp --disable-mysql --disable-optical-drive \
--disable-avahi --disable-samba

exit 0
Sam Stenvall
Collaborator

I'm thinking it has something to do with how the stream identifier is split into a composition and ancillary ID, though I wasn't able to find any definite definition of how those values should be stored in the extradata field.

Edit: what I said was regarding DVDDemuxPVRClient, I guess DVDDemuxHTSP is what is used when watching live TV using pvr.hts.

Lars Op den Kamp
Collaborator

DVDDemuxHTSP is not used by pvr.hts. it's used by our old htsp vfs handler. the add-on uses DVDDemuxPVRClient

Sam Stenvall
Collaborator

@opdenkamp: that explains a lot of things. Is anyone actually using that part of the code?

Lars Op den Kamp
Collaborator

no idea, but it's been a candidate for my "to be removed" list for a while now but forgot to do it. feel free to nuke it

Joakim Plate
Collaborator

please don't.. i use it. It's way easier and quicker to get setup for getting live tv.

Joakim Plate
Collaborator

I've added my fix in: 27d94da

Lars Op den Kamp
Collaborator

heh you have just become the maintainer for that file @elupus ;-)

iLLiac4

Cool does this mean that it is fixed now and it will be included in prebuild packages?

Sam Stenvall
Collaborator

@iLLiac4: yes

Please sign in to comment.
Something went wrong with that request. Please try again.