From 729b37149c9cbef77d5ad75d91017af3b9084577 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 5 Jan 2013 11:45:51 +0100 Subject: [PATCH 1/2] mvi: set framerate This container does not store timestamps and thus supports CFR only. --- libavformat/mvi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mvi.c b/libavformat/mvi.c index 10ec8bbb20..7fb163bea3 100644 --- a/libavformat/mvi.c +++ b/libavformat/mvi.c @@ -87,6 +87,7 @@ static int read_header(AVFormatContext *s) ast->codec->bit_rate = ast->codec->sample_rate * 8; avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000); + vst->avg_frame_rate = av_inv_q(vst->time_base); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vst->codec->codec_id = AV_CODEC_ID_MOTIONPIXELS; From e6b1c3bbe7082c71ea8ee8ac83698c156c9e4838 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 28 Dec 2012 09:54:29 +0100 Subject: [PATCH 2/2] pthread: make ff_thread_release_buffer idempotent. I.e. don't do anything on already released frames. --- libavcodec/pthread.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 73d9da3f1c..cd44b8c73b 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -975,6 +975,9 @@ void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f) PerThreadContext *p = avctx->thread_opaque; FrameThreadContext *fctx; + if (!f->data[0]) + return; + if (!(avctx->active_thread_type&FF_THREAD_FRAME)) { avctx->release_buffer(avctx, f); return;