1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00

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
This commit is contained in:
reimar 2011-02-06 14:06:35 +00:00 committed by Uoti Urpala
parent 9e2b74b073
commit 7781f23d68

View File

@ -1485,10 +1485,11 @@ static int pes_parse2(unsigned char *buf, uint16_t packet_len, ES_stream_t *es,
} }
/* SPU SUBS */ /* SPU SUBS */
else if(type_from_pmt == SPU_DVB || 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; // offset/length fiddling to make decoding with lavc possible
es->size = packet_len; es->start = p + 2;
es->size = packet_len - 2;
es->type = SPU_DVB; es->type = SPU_DVB;
es->payload_size -= packet_len; es->payload_size -= packet_len;