diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-02-06 14:06:35 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-02-15 19:30:01 +0200 |
commit | 7781f23d68c0e9ac9d842dd781b12ff0e6b962b9 (patch) | |
tree | 618b1eeb75814ee549b4a38b2b622ea99ee188f4 /libmpdemux | |
parent | 9e2b74b073f28673d12b4445de3e189cad18b442 (diff) | |
download | mpv-7781f23d68c0e9ac9d842dd781b12ff0e6b962b9.tar.bz2 mpv-7781f23d68c0e9ac9d842dd781b12ff0e6b962b9.tar.xz |
demux_ts: change DVB SPU format for libavcodec
Change DVB SPU stream format in TS demuxer so it can be decoded by
libavcodec (as soon as lavc is fixed not to fail just because of an
extra padding byte).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32866 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_ts.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index d57f312f26..237a524bd4 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -1485,10 +1485,11 @@ static int pes_parse2(unsigned char *buf, uint16_t packet_len, ES_stream_t *es, } /* SPU SUBS */ else if(type_from_pmt == SPU_DVB || - (packet_len >= 1 && (p[0] == 0x20) && pes_is_aligned)) // && p[1] == 0x00)) + (packet_len >= 2 && (p[0] == 0x20) && pes_is_aligned)) // && p[1] == 0x00)) { - es->start = p; - es->size = packet_len; + // offset/length fiddling to make decoding with lavc possible + es->start = p + 2; + es->size = packet_len - 2; es->type = SPU_DVB; es->payload_size -= packet_len; |