Call this new function before decode() to replace the custom and
inconsistant initialization in various decoders.
This function is equivalent to avcodec_get_frame_defaults() for AVFrame.
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Instead of returning an error when bytes are left over, just return
the number of actually used bytes as other decoders do.
Instead add a special case so an error will be returned when none
of the data looks valid to avoid making debugging a pain.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 4a72765a1c)
Instead of returning an error when bytes are left over, just return
the number of actually used bytes as other decoders do.
Instead add a special case so an error will be returned when none
of the data looks valid to avoid making debugging a pain.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
In some places, dvbsubdec passes improper input buffer size to
bitstream reading functions, not accounting for reading pointer
updates.
Fixed by using buffer_end - buffer pointer instead of fixed buffer length.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
In some places, dvbsubdec passes improper input buffer size to
bitstream reading functions, not accounting for reading pointer
updates.
Fixed by using buffer_end - buffer pointer instead of fixed buffer length.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
of sub_id, this allows detecting when that information is not available and
just decode everything.
In addition extradata is required for many codecs and thus in contrast to
sub_id generally already passed on by any programs using libav*.
Also ask for a sample if we encounter a stream with multiple/changing IDs.
Originally committed as revision 24238 to svn://svn.ffmpeg.org/ffmpeg/trunk
The display definition segment is used to properly display SD DVB subtitles in
HD video streams.
Originally committed as revision 23626 to svn://svn.ffmpeg.org/ffmpeg/trunk
decoders instead of as small as possible.
This avoids completely unnecessary issues with e.g. libswscale.
Originally committed as revision 19673 to svn://svn.ffmpeg.org/ffmpeg/trunk
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.
Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread
"Google Summer of Code participation" on the mailinglist.
Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunk