summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorAlberto Delmás <adelmas@gmail.com>2012-08-24 17:45:57 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-08-31 07:37:16 +0200
commitee769c6a7c1d4ec6560f5e5a6f457b770b10fb33 (patch)
treec1a3fc95ccfc0d84bfa9edfa22adc85cdcdbd6da /libavcodec/mpegvideo.c
parentd96d6ba61888c6a97d9426ca80bf36f3812cac76 (diff)
MSS2 decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 13e2accfbd..e9aff3b316 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -226,10 +226,11 @@ void ff_copy_picture(Picture *dst, Picture *src)
*/
static void free_frame_buffer(MpegEncContext *s, Picture *pic)
{
- /* Windows Media Image codecs allocate internal buffers with different
- * dimensions; ignore user defined callbacks for these
- */
- if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
+ /* WM Image / Screen codecs allocate internal buffers with different
+ * dimensions / colorspaces; ignore user-defined callbacks for these. */
+ if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&
+ s->codec_id != AV_CODEC_ID_VC1IMAGE &&
+ s->codec_id != AV_CODEC_ID_MSS2)
ff_thread_release_buffer(s->avctx, &pic->f);
else
avcodec_default_release_buffer(s->avctx, &pic->f);
@@ -254,7 +255,9 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
}
}
- if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
+ if (s->codec_id != AV_CODEC_ID_WMV3IMAGE &&
+ s->codec_id != AV_CODEC_ID_VC1IMAGE &&
+ s->codec_id != AV_CODEC_ID_MSS2)
r = ff_thread_get_buffer(s->avctx, &pic->f);
else
r = avcodec_default_get_buffer(s->avctx, &pic->f);