mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avcodec/mpegvideo_dec, h264_slice: Return proper error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
7f0efe2324
commit
17414abb69
@ -483,7 +483,7 @@ static int h264_frame_start(H264Context *h)
|
|||||||
|
|
||||||
if (!ff_thread_can_start_frame(h->avctx)) {
|
if (!ff_thread_can_start_frame(h->avctx)) {
|
||||||
av_log(h->avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
|
av_log(h->avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
|
||||||
return -1;
|
return AVERROR_BUG;
|
||||||
}
|
}
|
||||||
|
|
||||||
release_unused_pictures(h, 1);
|
release_unused_pictures(h, 1);
|
||||||
|
@ -328,7 +328,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
|
|
||||||
if (!ff_thread_can_start_frame(avctx)) {
|
if (!ff_thread_can_start_frame(avctx)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
|
av_log(avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
|
||||||
return -1;
|
return AVERROR_BUG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mark & release old frames */
|
/* mark & release old frames */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user