[FFmpeg-cvslog] mpegvideo: dont call draw edges on lowres

Michael Niedermayer git at videolan.org
Wed Aug 15 22:43:27 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 15 22:33:55 2012 +0200| [0114c571d4c8cc1036850ced924683709390681a] | committer: Michael Niedermayer

mpegvideo: dont call draw edges on lowres

this crashes otherwise, and can happen from try_decode_frame() in the case of decoding errors
Fixes Ticket1602

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0114c571d4c8cc1036850ced924683709390681a
---

 libavcodec/mpegvideo.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 22a9ec8..fc05b5f 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1354,7 +1354,9 @@ void ff_MPV_frame_end(MpegEncContext *s)
               s->unrestricted_mv &&
               s->current_picture.f.reference &&
               !s->intra_only &&
-              !(s->flags & CODEC_FLAG_EMU_EDGE)) {
+              !(s->flags & CODEC_FLAG_EMU_EDGE) &&
+              !s->avctx->lowres
+            ) {
         int hshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_w;
         int vshift = av_pix_fmt_descriptors[s->avctx->pix_fmt].log2_chroma_h;
         s->dsp.draw_edges(s->current_picture.f.data[0], s->current_picture.f.linesize[0],



More information about the ffmpeg-cvslog mailing list