Advertisement
Guest User

Untitled

a guest
Jan 9th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
  2. index a68e42d..15734fb 100644
  3. --- a/libavcodec/zmbv.c
  4. +++ b/libavcodec/zmbv.c
  5. @@ -529,6 +529,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
  6. int i, j;
  7.  
  8. out = c->pic.data[0];
  9. + if (c->cur == NULL) {
  10. + return AVERROR(EIO);
  11. + }
  12. src = c->cur;
  13. switch (c->fmt) {
  14. case ZMBV_FMT_8BPP:
  15. @@ -610,6 +613,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
  16. int zret; // Zlib return code
  17.  
  18. c->avctx = avctx;
  19. + c->cur = NULL;
  20. + c->prev = NULL;
  21.  
  22. c->width = avctx->width;
  23. c->height = avctx->height;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement