Skip to content

Commit

Permalink
Merge pull request #1476 from bobo1on1/tscc-fix
Browse files Browse the repository at this point in the history
fixed: ffmpeg tscc codec needs bits_per_coded_sample passed from the dem...
  • Loading branch information
bobo1on1 committed Sep 25, 2012
2 parents f6526b3 + 9b89475 commit a642b33
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
Expand Up @@ -263,6 +263,7 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
// if we don't do this, then some codecs seem to fail.
m_pCodecContext->coded_height = hints.height;
m_pCodecContext->coded_width = hints.width;
m_pCodecContext->bits_per_coded_sample = hints.bitsperpixel;

if( hints.extradata && hints.extrasize > 0 )
{
Expand Down
2 changes: 2 additions & 0 deletions xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
Expand Up @@ -162,6 +162,7 @@ class CDemuxStreamVideo : public CDemuxStream
bForcedAspect = false;
type = STREAM_VIDEO;
iOrientation = 0;
iBitsPerPixel = 0;
}

virtual ~CDemuxStreamVideo() {}
Expand All @@ -176,6 +177,7 @@ class CDemuxStreamVideo : public CDemuxStream
bool bPTSInvalid; // pts cannot be trusted (avi's).
bool bForcedAspect; // aspect is forced from container
int iOrientation; // orientation of the video in degress counter clockwise
int iBitsPerPixel;
};

class CDemuxStreamAudio : public CDemuxStream
Expand Down
1 change: 1 addition & 0 deletions xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
Expand Up @@ -1010,6 +1010,7 @@ void CDVDDemuxFFmpeg::AddStream(int iId)
st->iLevel = pStream->codec->level;
st->iProfile = pStream->codec->profile;
st->iOrientation = 0;
st->iBitsPerPixel = pStream->codec->bits_per_coded_sample;

AVDictionaryEntry *rtag = m_dllAvUtil.av_dict_get(pStream->metadata, "rotate", NULL, 0);
if (rtag)
Expand Down
4 changes: 4 additions & 0 deletions xbmc/cores/dvdplayer/DVDStreamInfo.cpp
Expand Up @@ -59,6 +59,7 @@ void CDVDStreamInfo::Clear()
profile = 0;
ptsinvalid = false;
forced_aspect = false;
bitsperpixel = 0;

channels = 0;
samplerate = 0;
Expand Down Expand Up @@ -96,6 +97,7 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, bool withextradata)
|| profile != right.profile
|| ptsinvalid != right.ptsinvalid
|| forced_aspect != right.forced_aspect
|| bitsperpixel != right.bitsperpixel
|| vfr != right.vfr) return false;

// AUDIO
Expand Down Expand Up @@ -152,6 +154,7 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)
ptsinvalid = right.ptsinvalid;
forced_aspect = right.forced_aspect;
orientation = right.orientation;
bitsperpixel = right.bitsperpixel;

// AUDIO
channels = right.channels;
Expand Down Expand Up @@ -202,6 +205,7 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)
ptsinvalid = stream->bPTSInvalid;
forced_aspect = stream->bForcedAspect;
orientation = stream->iOrientation;
bitsperpixel = stream->iBitsPerPixel;
}
else if( right.type == STREAM_SUBTITLE )
{
Expand Down
1 change: 1 addition & 0 deletions xbmc/cores/dvdplayer/DVDStreamInfo.h
Expand Up @@ -77,6 +77,7 @@ class CDVDStreamInfo
bool ptsinvalid; // pts cannot be trusted (avi's).
bool forced_aspect; // aspect is forced from container
int orientation; // orientation of the video in degress counter clockwise
int bitsperpixel;

// AUDIO
int channels;
Expand Down

0 comments on commit a642b33

Please sign in to comment.