|
|
@ -193,7 +193,8 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts) |
|
|
|
av_buffersrc_add_ref(ist->filters[i]->filter, |
|
|
|
av_buffersrc_add_ref(ist->filters[i]->filter, |
|
|
|
avfilter_ref_buffer(ref, ~0), |
|
|
|
avfilter_ref_buffer(ref, ~0), |
|
|
|
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT | |
|
|
|
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT | |
|
|
|
AV_BUFFERSRC_FLAG_NO_COPY); |
|
|
|
AV_BUFFERSRC_FLAG_NO_COPY | |
|
|
|
|
|
|
|
AV_BUFFERSRC_FLAG_PUSH); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void sub2video_update(InputStream *ist, AVSubtitle *sub, int64_t pts) |
|
|
|
static void sub2video_update(InputStream *ist, AVSubtitle *sub, int64_t pts) |
|
|
@ -1508,7 +1509,8 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) |
|
|
|
decoded_frame_tb, |
|
|
|
decoded_frame_tb, |
|
|
|
(AVRational){1, ist->st->codec->sample_rate}); |
|
|
|
(AVRational){1, ist->st->codec->sample_rate}); |
|
|
|
for (i = 0; i < ist->nb_filters; i++) |
|
|
|
for (i = 0; i < ist->nb_filters; i++) |
|
|
|
av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, 0); |
|
|
|
av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, |
|
|
|
|
|
|
|
AV_BUFFERSRC_FLAG_PUSH); |
|
|
|
|
|
|
|
|
|
|
|
decoded_frame->pts = AV_NOPTS_VALUE; |
|
|
|
decoded_frame->pts = AV_NOPTS_VALUE; |
|
|
|
|
|
|
|
|
|
|
@ -1619,9 +1621,10 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) |
|
|
|
buf->refcount++; |
|
|
|
buf->refcount++; |
|
|
|
av_buffersrc_add_ref(ist->filters[i]->filter, fb, |
|
|
|
av_buffersrc_add_ref(ist->filters[i]->filter, fb, |
|
|
|
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT | |
|
|
|
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT | |
|
|
|
AV_BUFFERSRC_FLAG_NO_COPY); |
|
|
|
AV_BUFFERSRC_FLAG_NO_COPY | |
|
|
|
|
|
|
|
AV_BUFFERSRC_FLAG_PUSH); |
|
|
|
} else |
|
|
|
} else |
|
|
|
if(av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, 0)<0) { |
|
|
|
if(av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, AV_BUFFERSRC_FLAG_PUSH)<0) { |
|
|
|
av_log(NULL, AV_LOG_FATAL, "Failed to inject frame into filter network\n"); |
|
|
|
av_log(NULL, AV_LOG_FATAL, "Failed to inject frame into filter network\n"); |
|
|
|
exit_program(1); |
|
|
|
exit_program(1); |
|
|
|
} |
|
|
|
} |
|
|
|