Unified · Split
| @@ -104,10 +104,8 @@ static av_cold int paf_video_init(AVCodecContext *avctx) · 103 unmodified lines | |||
| 104 | c->video_size = avctx->width * avctx->height; | 104 | c->video_size = avctx->width * avctx->height; |
| 105 | for (i = 0; i < 4; i++) { | 105 | for (i = 0; i < 4; i++) { |
| 106 | c->frame[i] = av_mallocz(c->frame_size); | 106 | c->frame[i] = av_mallocz(c->frame_size); |
| 107 | if (!c->frame[i]) { | 107 | if (!c->frame[i]) |
| 108 | paf_video_close(avctx); | ||
| 109 | return AVERROR(ENOMEM); | 108 | return AVERROR(ENOMEM); |
| 110 | } | ||
| 111 | } | 109 | } |
| 112 | 110 | ||
| 113 | return 0; | 111 | return 0; |
| @@ -419,5 +417,5 @@ AVCodec ff_paf_video_decoder = { · 305 unmodified lines | |||
| 419 | .close = paf_video_close, | 417 | .close = paf_video_close, |
| 420 | .decode = paf_video_decode, | 418 | .decode = paf_video_decode, |
| 421 | .capabilities = AV_CODEC_CAP_DR1, | 419 | .capabilities = AV_CODEC_CAP_DR1, |
| 422 | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, | 420 | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, |
| 423 | }; | 421 | }; |