mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-03-01 16:46:10 +00:00
buffersink: add AV_BUFFERSINK_FLAG_NO_REQUEST.
This commit is contained in:
parent
2d6522bab0
commit
e11110dee4
@ -63,6 +63,13 @@ AVABufferSinkParams *av_abuffersink_params_alloc(void);
|
|||||||
*/
|
*/
|
||||||
#define AV_BUFFERSINK_FLAG_PEEK 1
|
#define AV_BUFFERSINK_FLAG_PEEK 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tell av_buffersink_get_buffer_ref() not to request a frame fom its input.
|
||||||
|
* If a frame is already buffered, it is read (and removed from the buffer),
|
||||||
|
* but if no frame is present, return AVERROR(EAGAIN).
|
||||||
|
*/
|
||||||
|
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an audio/video buffer data from buffer_sink and put it in bufref.
|
* Get an audio/video buffer data from buffer_sink and put it in bufref.
|
||||||
*
|
*
|
||||||
|
@ -126,6 +126,8 @@ int av_buffersink_get_buffer_ref(AVFilterContext *ctx,
|
|||||||
|
|
||||||
/* no picref available, fetch it from the filterchain */
|
/* no picref available, fetch it from the filterchain */
|
||||||
if (!av_fifo_size(buf->fifo)) {
|
if (!av_fifo_size(buf->fifo)) {
|
||||||
|
if (flags & AV_BUFFERSINK_FLAG_NO_REQUEST)
|
||||||
|
return AVERROR(EAGAIN);
|
||||||
if ((ret = avfilter_request_frame(inlink)) < 0)
|
if ((ret = avfilter_request_frame(inlink)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
#include "libavutil/avutil.h"
|
#include "libavutil/avutil.h"
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_MAJOR 2
|
#define LIBAVFILTER_VERSION_MAJOR 2
|
||||||
#define LIBAVFILTER_VERSION_MINOR 71
|
#define LIBAVFILTER_VERSION_MINOR 72
|
||||||
#define LIBAVFILTER_VERSION_MICRO 102
|
#define LIBAVFILTER_VERSION_MICRO 100
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||||
LIBAVFILTER_VERSION_MINOR, \
|
LIBAVFILTER_VERSION_MINOR, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user