diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-17 22:25:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-17 22:36:43 +0200 |
commit | 9a9ceb8776264c799ff9669ed7e287a5daaab564 (patch) | |
tree | 25748ff74acaa620aa627ed7797a87e986959f19 /libavfilter/vf_select.c | |
parent | 979bea13003ef489d95d2538ac2fb1c26c6f103b (diff) | |
parent | d763fb7d47fdbd107ea65cdf511f2f21558f6610 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavfi: add select filter
oggdec: fix out of bound write in the ogg demuxer
movenc: create an alternate group for each media type
lavd: add libcdio-paranoia input device for audio CD grabbing
rawdec: refactor private option for raw video demuxers
pcmdec: use unique classes for all pcm demuxers.
rawdec: g722 is always 1 channel/16kHz
Conflicts:
Changelog
configure
doc/filters.texi
libavdevice/avdevice.h
libavfilter/avfilter.h
libavfilter/vf_select.c
tests/ref/lavf/mov
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_select.c')
-rw-r--r-- | libavfilter/vf_select.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c index bbfb63edf3..3ba2670a0f 100644 --- a/libavfilter/vf_select.c +++ b/libavfilter/vf_select.c @@ -45,18 +45,18 @@ static const char *var_names[] = { "prev_selected_t", ///< previously selected time "pict_type", ///< the type of picture in the movie - "PICT_TYPE_I", - "PICT_TYPE_P", - "PICT_TYPE_B", - "PICT_TYPE_S", - "PICT_TYPE_SI", - "PICT_TYPE_SP", - "PICT_TYPE_BI", + "I", + "P", + "B", + "S", + "SI", + "SP", + "BI", "interlace_type", ///< the frame interlace type - "INTERLACE_TYPE_P", - "INTERLACE_TYPE_T", - "INTERLACE_TYPE_B", + "PROGRESSIVE", + "TOPFIRST", + "BOTTOMFIRST", "n", ///< frame number (starting from zero) "selected_n", ///< selected frame number (starting from zero) @@ -317,19 +317,14 @@ static av_cold void uninit(AVFilterContext *ctx) { SelectContext *select = ctx->priv; AVFilterBufferRef *picref; - int i; - if (select->expr) - av_expr_free(select->expr); + av_expr_free(select->expr); select->expr = NULL; - if (select->pending_frames) { - for (i = 0; i < av_fifo_size(select->pending_frames)/sizeof(picref); i++) { - av_fifo_generic_read(select->pending_frames, &picref, sizeof(picref), NULL); - avfilter_unref_buffer(picref); - } - av_fifo_free(select->pending_frames); - } + while (select->pending_frames && + av_fifo_generic_read(select->pending_frames, &picref, sizeof(picref), NULL) == sizeof(picref)) + avfilter_unref_buffer(picref); + av_fifo_free(select->pending_frames); select->pending_frames = NULL; } |