diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-17 00:10:47 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-17 00:10:47 +0200 |
commit | 6579bc439b98501efe14f9043f9582c4161a5209 (patch) | |
tree | 7922340a3b6e26d756c0dad8551b07d1e7eef072 /ffmpeg.c | |
parent | 3e2cf79e1549f6ba64aa6219292cc2b638a29b46 (diff) | |
download | ffmpeg-6579bc439b98501efe14f9043f9582c4161a5209.tar.gz |
ffmpeg: allow switching to qatars buffersrc API
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -2639,7 +2639,11 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int /* no picture yet */ if (!pkt->size) for (i = 0; i < ist->nb_filters; i++) +#ifdef SRCA + av_buffersrc_buffer(ist->filters[i]->filter, NULL); +#else av_buffersrc_add_ref(ist->filters[i]->filter, NULL, 0); +#endif return ret; } @@ -2703,11 +2707,17 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int av_assert0(buf->refcount>0); buf->refcount++; +#ifdef SRCA + av_buffersrc_buffer(ist->filters[i]->filter, fb); + } else + if(av_buffersrc_write_frame(ist->filters[i]->filter, decoded_frame)<0) { +#else av_buffersrc_add_ref(ist->filters[i]->filter, fb, AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT | AV_BUFFERSRC_FLAG_NO_COPY); } else if(av_buffersrc_add_frame(ist->filters[i]->filter, decoded_frame, 0)<0) { +#endif av_log(NULL, AV_LOG_FATAL, "Failed to inject frame into filter network\n"); exit_program(1); } |