diff options
author | wm4 <wm4@nowhere> | 2013-05-21 22:03:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-21 22:07:13 +0200 |
commit | b477c68aa084d202de24dc02cb008871d218f976 (patch) | |
tree | 64f342b671e6ba5fd10242b239ba3fd970205361 /talloc.c | |
parent | e8be12158086e1099dfee0fc6d8cc75a1ec20cb7 (diff) | |
download | mpv-b477c68aa084d202de24dc02cb008871d218f976.tar.bz2 mpv-b477c68aa084d202de24dc02cb008871d218f976.tar.xz |
demux: workaround for -demuxer mpegts -correct-pts
Using -demuxer mpegts -correct-pts triggered the assertion in
ds_get_packet2(). This is not surprising, because the correct-pts code
was changed to accept _complete_ packets, while all the old demuxers
(including the mpegts demuxer) require you to use "partial" packet
reads, together with the video_read_frame(). (That function actually
parses video frames, so fragments of the original "packets" can be fed
to the decoder.)
However, it returns out demux_ts packet's are mostly useable. demux_ts
still adds an offset (i.e. ds->buffer_pos != 0) to the packets when
calling internal parser functions, such as in parse_es.c. While this is
unclean design due to mplayer's old video demuxing/decoding path, it can
be easily be made work by modifying the packet as returned by
ds_get_packet2(). We also have to change the packet freeing code, as
demux_packet->buffer doesn't have to point to the start of the memory
allocation anymore.
MPlayer handles this "correctly" because it doesn't have a function that
reads a complete packet.
Diffstat (limited to 'talloc.c')
0 files changed, 0 insertions, 0 deletions