The specification does not allow multiple bits to be set,
but some encoders do it anyway.
Applying it only to the first seems to give better results.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This fixes playback of DVB subtitles in
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket1065/Test1.wtv
in MPlayer.
FFplay is not affected since it assumes that the subtitles
are scaled to match the video - but this usually isn't the
case after rescaling the video and stream-copying subtitles.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
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