Skip to content

Commit

Permalink
FFMPEG decavcodec: Consider returned error from av_buffersrc_add_fram…
Browse files Browse the repository at this point in the history
…e(..)
  • Loading branch information
sgothel authored and bradleysepos committed May 29, 2018
1 parent 0514750 commit 2d6441d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libhb/decavcodec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,8 +1294,12 @@ static void filter_video(hb_work_private_t *pv)
{
int result;

av_buffersrc_add_frame(pv->video_filters.input, pv->frame);
result = av_buffersink_get_frame(pv->video_filters.output, pv->frame);
result = av_buffersrc_add_frame(pv->video_filters.input, pv->frame);
if (result < 0) {
hb_error("filter_video: failed to add frame");
} else {
result = av_buffersink_get_frame(pv->video_filters.output, pv->frame);
}
while (result >= 0)
{
hb_buffer_t * buf = copy_frame(pv);
Expand Down

0 comments on commit 2d6441d

Please sign in to comment.