Skip to content

Commit

Permalink
VideoPlayer: hasta la vista marco
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta authored and popcornmix committed Jan 18, 2016
1 parent d4670e3 commit fd9ed11
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,11 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p
av_init_packet(&avpkt);
avpkt.data = pData;
avpkt.size = iSize;
#define SET_PKT_TS(ts) \
if(ts != DVD_NOPTS_VALUE)\
avpkt.ts = (ts / DVD_TIME_BASE) * AV_TIME_BASE;\
else\
avpkt.ts = AV_NOPTS_VALUE
SET_PKT_TS(pts);
SET_PKT_TS(dts);
#undef SET_PKT_TS
int64_t ts = (dts == DVD_NOPTS_VALUE) ? AV_NOPTS_VALUE : dts / DVD_TIME_BASE * AV_TIME_BASE;
avpkt.dts = ts;
ts = (pts == DVD_NOPTS_VALUE) ? AV_NOPTS_VALUE : pts / DVD_TIME_BASE * AV_TIME_BASE;
avpkt.pts = ts;

/* We lie, but this flag is only used by pngdec.c.
* Setting it correctly would allow CorePNG decoding. */
avpkt.flags = AV_PKT_FLAG_KEY;
Expand Down

0 comments on commit fd9ed11

Please sign in to comment.