Store palette data in the codec context, do not assume that the frame
allocated the first time by avctx->get_buffer will be returned again.
This requires to store the palette which comes with the first frame in
the context, and copy it to the following frames.
Fix trac issue #84.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Also deprecate av_get_pict_type_char() in favor of
av_get_picture_type_char().
The new enum and av_get_picture_type_char() are defined in libavutil.
This allows the use in libavfilter without the need to link against
libavcodec.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Roger Pau Monné <roger.pau@entel.upc.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Also set movie->picref to NULL, in order to avoid a crash in uninit()
when movie->picref is unreffed again and it was already freed.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Make the filter accept parametric expressions for the output video
size.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qatar/master:
graphparser: add a NULL check on the argument passed to strstr
setdar: prefer "sar" over "par" in log info message
fade: fix draw_slice() check on fade->factor value
fade: make draw_slice() chroma check against planes 1 and 2
win32: include the correct header in cmdutils.c
ac3: fix memleak in fixed-point encoder
flashsv: Return more meaningful error values.
flashsv: Employ explicit AVCodec struct initializers.
read AVI palette from the end of extradata
cosmetics: K&R coding style and more whitespace for Flash Screen Video
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This is required for setting up the filterchain, as it requires the
pixel format to be set, which is usually done when probing the file
with av_find_stream_info().
Fix trac issue #83.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
draw_slice() checks that the fade factor is < 65536 and only
calculates the fade if so. But the fade factor is clipped in
end_frame() by av_clip_uint16() to 65535, so the fade is calculated
for every frame. This patch alters the check so that it compares with
< 65535 (UINT16_MAX).
Signed-off-by: Anton Khirnov <anton@khirnov.net>
draw_slice() checks that planes 0 and 1 of AVFilterBufferRef's data
are not NULL before manipulating planes 1 and 2. This patch makes the
check against planes 1 and 2. More senseful and possibly more robust.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
In the loop:
for (i=0; i<dstH; i++) {
int chrI= i*c->chrDstH / dstH;
when i*c->chrDstH > INT_MAX this leads to an integer overflow, which
results in a negative value for chrI and in out-of-buffer reads. The
overflow is avoided by forcing int64_t arithmetic by casting i to
int64_t.
Fix crash, and trac issue #72.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Also automatically select the show mode only if not specified by the
user.
Fix trac issue #109.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>