diff libschroedingerdec.c @ 10061:09f2db2d7c90 libavcodec

Fix bug caused by difference in stride and picture width. When a frame is allocated using libschroedinger routines, the frame data size does not match the actual frame size if the width is not a multiple of 16. So we cannot do a straightforward memcpy of the frame returned by libschroedinger into the FFmpeg picture as the stride differs from the width. Fix this bug by allocating for the libschroedinger frame with the dimensions in AVCodecContext within libavcodec and passing the frame to libschroedinger. patch by Anuradha Suraparaju, anuradha rd.bbc.co uk
author diego
date Sat, 15 Aug 2009 11:59:53 +0000
parents 965220ebc611
children 8a4984c5cacc
line wrap: on
line diff
--- a/libschroedingerdec.c	Sat Aug 15 11:42:15 2009 +0000
+++ b/libschroedingerdec.c	Sat Aug 15 11:59:53 2009 +0000
@@ -256,11 +256,8 @@
 
             case SCHRO_DECODER_NEED_FRAME:
                 /* Decoder needs a frame - create one and push it in. */
-
-                frame = schro_frame_new_and_alloc(NULL,
-                                                  p_schro_params->frame_format,
-                                                  format->width,
-                                                  format->height);
+                frame = ff_create_schro_frame(avccontext,
+                                              p_schro_params->frame_format);
                 schro_decoder_add_output_picture(decoder, frame);
                 break;