Revision 22fa406f

View differences:

libavcodec/libmp3lame.c
69 69

  
70 70
    avctx->frame_size = lame_get_framesize(s->gfp);
71 71

  
72
    avctx->coded_frame= avcodec_alloc_frame();
72
    if(!(avctx->coded_frame= avcodec_alloc_frame())) {
73
        lame_close(s->gfp);
74

  
75
        return AVERROR(ENOMEM);
76
    }
73 77
    avctx->coded_frame->key_frame= 1;
74 78

  
75 79
    return 0;

Also available in: Unified diff