[FFmpeg-cvslog] snow: do not draw_edge if emu_edge is set

Michael Niedermayer git at videolan.org
Sat Oct 29 02:31:40 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 26 15:47:14 2011 +0200| [8fa97302e03f00a81177027c3578274fef41c250] | committer: Luca Barbato

snow: do not draw_edge if emu_edge is set

Fix segfault on emu edge, to reproduce

make fate-vsynth1-snow
avplay -flags emu_edge tests/data/vsynth1/snow.avi

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavcodec/snow.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 02fc5f7..a3af577 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -1609,8 +1609,6 @@ static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, i
 static void halfpel_interpol(SnowContext *s, uint8_t *halfpel[4][4], AVFrame *frame){
     int p,x,y;
 
-    assert(!(s->avctx->flags & CODEC_FLAG_EMU_EDGE));
-
     for(p=0; p<3; p++){
         int is_chroma= !!p;
         int w= s->avctx->width  >>is_chroma;
@@ -1667,7 +1665,7 @@ static int frame_start(SnowContext *s){
    int w= s->avctx->width; //FIXME round up to x16 ?
    int h= s->avctx->height;
 
-    if(s->current_picture.data[0]){
+    if (s->current_picture.data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) {
         s->dsp.draw_edges(s->current_picture.data[0],
                           s->current_picture.linesize[0], w   , h   ,
                           EDGE_WIDTH  , EDGE_WIDTH  , EDGE_TOP | EDGE_BOTTOM);



More information about the ffmpeg-cvslog mailing list