mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Merge commit '45a1694fde251ee56e23aec073d73172c00aa470'
* commit '45a1694fde251ee56e23aec073d73172c00aa470': jpeg2000dec: cleanup properly after decoding errors Conflicts: libavcodec/jpeg2000dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
aecb3421f6
@ -1288,27 +1288,27 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return -1;
|
||||
}
|
||||
if (ret = jpeg2000_read_main_headers(s))
|
||||
goto fail;
|
||||
goto end;
|
||||
|
||||
/* get picture buffer */
|
||||
if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "ff_thread_get_buffer() failed.\n");
|
||||
goto fail;
|
||||
goto end;
|
||||
}
|
||||
picture->pict_type = AV_PICTURE_TYPE_I;
|
||||
picture->key_frame = 1;
|
||||
|
||||
if (ret = jpeg2000_read_bitstream_packets(s))
|
||||
goto fail;
|
||||
goto end;
|
||||
for (tileno = 0; tileno < s->numXtiles * s->numYtiles; tileno++)
|
||||
if (ret = jpeg2000_decode_tile(s, s->tile + tileno, picture))
|
||||
goto fail;
|
||||
goto end;
|
||||
jpeg2000_dec_cleanup(s);
|
||||
|
||||
*got_frame = 1;
|
||||
|
||||
return s->buf - s->buf_start;
|
||||
fail:
|
||||
end:
|
||||
jpeg2000_dec_cleanup(s);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user