Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
10060:965220ebc611 | 10061:09f2db2d7c90 |
---|---|
254 go = 0; | 254 go = 0; |
255 break; | 255 break; |
256 | 256 |
257 case SCHRO_DECODER_NEED_FRAME: | 257 case SCHRO_DECODER_NEED_FRAME: |
258 /* Decoder needs a frame - create one and push it in. */ | 258 /* Decoder needs a frame - create one and push it in. */ |
259 | 259 frame = ff_create_schro_frame(avccontext, |
260 frame = schro_frame_new_and_alloc(NULL, | 260 p_schro_params->frame_format); |
261 p_schro_params->frame_format, | |
262 format->width, | |
263 format->height); | |
264 schro_decoder_add_output_picture(decoder, frame); | 261 schro_decoder_add_output_picture(decoder, frame); |
265 break; | 262 break; |
266 | 263 |
267 case SCHRO_DECODER_OK: | 264 case SCHRO_DECODER_OK: |
268 /* Pull a frame out of the decoder. */ | 265 /* Pull a frame out of the decoder. */ |