switch (ost->filter->filter->inputs[0]->type) {
case AVMEDIA_TYPE_VIDEO:
- avfilter_fill_frame_from_video_buffer_ref(filtered_frame, picref);
+ avfilter_copy_buf_props(filtered_frame, picref);
filtered_frame->pts = frame_pts;
if (!ost->frame_aspect_ratio)
ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio;
if (fabs(is->frame_last_filter_delay) > AV_NOSYNC_THRESHOLD / 10.0)
is->frame_last_filter_delay = 0;
- avfilter_fill_frame_from_video_buffer_ref(frame, picref);
+ avfilter_copy_buf_props(frame, picref);
pts_int = picref->pts;
tb = filt_out->inputs[0]->time_base;
return 0;
}
+#ifdef FF_API_FILL_FRAME
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *samplesref)
{
{
return avfilter_copy_buf_props(frame, ref);
}
+#endif
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
int perms);
+#ifdef FF_API_FILL_FRAME
/**
* Fill an AVFrame with the information stored in samplesref.
*
* @param samplesref an audio buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
+ * @deprecated Use avfilter_copy_buf_props() instead.
*/
+attribute_deprecated
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *samplesref);
* @param picref a video buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
+ * @deprecated Use avfilter_copy_buf_props() instead.
*/
+attribute_deprecated
int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *picref);
* @param ref a video or audio buffer reference
* @return 0 in case of success, a negative AVERROR code in case of
* failure
+ * @deprecated Use avfilter_copy_buf_props() instead.
*/
+attribute_deprecated
int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
const AVFilterBufferRef *ref);
+#endif
/**
* Add frame data to buffer_src.
#ifndef FF_API_FOO_COUNT
#define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
+#ifndef FF_API_FILL_FRAME
+#define FF_API_FILL_FRAME (LIBAVFILTER_VERSION_MAJOR < 4)
+#endif
#endif // AVFILTER_VERSION_H