during decoder initialization.
Originally committed as revision 19121 to svn://svn.ffmpeg.org/ffmpeg/trunk
int rest = buf_size;
int offset = 0;
+ if(c->pic.data[0])
+ avctx->release_buffer(avctx, &c->pic);
+ c->pic.reference = 1;
+ if(avctx->get_buffer(avctx, &c->pic) < 0){
+ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
+ return -1;
+ }
+
c->stream = buf;
flags = bytestream_get_le16(&c->stream);
rest -= 2;
return -1;
}
- c->pic.reference = 1;
- if(avctx->get_buffer(avctx, &c->pic) < 0){
- av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return -1;
- }
-
c->frame = av_malloc( avctx->width * avctx->height);
c->prev_frame = av_malloc( avctx->width * avctx->height);