Commit c8948858 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Warn if filters poll & request frame behave wrongly.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7ecabc85
...@@ -1923,8 +1923,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int ...@@ -1923,8 +1923,10 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
while (frame_available) { while (frame_available) {
if (ost->output_video_filter) { if (ost->output_video_filter) {
AVRational ist_pts_tb = ost->output_video_filter->inputs[0]->time_base; AVRational ist_pts_tb = ost->output_video_filter->inputs[0]->time_base;
if (av_buffersink_get_buffer_ref(ost->output_video_filter, &ost->picref, 0) < 0) if (av_buffersink_get_buffer_ref(ost->output_video_filter, &ost->picref, 0) < 0){
av_log(0, AV_LOG_WARNING, "AV Filter told us it has a frame available but failed to output one\n");
goto cont; goto cont;
}
if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) { if (!ist->filtered_frame && !(ist->filtered_frame = avcodec_alloc_frame())) {
av_free(buffer_to_free); av_free(buffer_to_free);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment