mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
h264: fix ff_generate_sliding_window_mmcos() prototype.
It's been returning an error value since bad446e251405dc250c3cbee199072e083a1e4b9 Also check for the errors it returns.
This commit is contained in:
parent
5e753ed502
commit
ea382767ad
@ -2904,7 +2904,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
|||||||
s->current_picture_ptr->frame_num = h->prev_frame_num;
|
s->current_picture_ptr->frame_num = h->prev_frame_num;
|
||||||
ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0);
|
ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0);
|
||||||
ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 1);
|
ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 1);
|
||||||
ff_generate_sliding_window_mmcos(h, 1);
|
if ((ret = ff_generate_sliding_window_mmcos(h, 1)) < 0 &&
|
||||||
|
s->avctx->err_recognition & AV_EF_EXPLODE)
|
||||||
|
return ret;
|
||||||
if (ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index) < 0 &&
|
if (ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index) < 0 &&
|
||||||
(s->avctx->err_recognition & AV_EF_EXPLODE))
|
(s->avctx->err_recognition & AV_EF_EXPLODE))
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
@ -648,7 +648,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count);
|
|||||||
int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
|
int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
|
||||||
int first_slice);
|
int first_slice);
|
||||||
|
|
||||||
void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice);
|
int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the top & left blocks are available if needed & change the
|
* Check if the top & left blocks are available if needed & change the
|
||||||
|
@ -488,7 +488,7 @@ static int check_opcodes(MMCO *mmco1, MMCO *mmco2, int n_mmcos)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
|
int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
|
||||||
{
|
{
|
||||||
MpegEncContext * const s = &h->s;
|
MpegEncContext * const s = &h->s;
|
||||||
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
|
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
|
||||||
@ -521,6 +521,7 @@ void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice)
|
|||||||
mmco_index, h->mmco_index, i);
|
mmco_index, h->mmco_index, i);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){
|
int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){
|
||||||
@ -686,7 +687,7 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
|
|||||||
int first_slice)
|
int first_slice)
|
||||||
{
|
{
|
||||||
MpegEncContext * const s = &h->s;
|
MpegEncContext * const s = &h->s;
|
||||||
int i;
|
int i, ret;
|
||||||
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
|
MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp;
|
||||||
int mmco_index = 0;
|
int mmco_index = 0;
|
||||||
|
|
||||||
@ -743,8 +744,11 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
|
|||||||
}
|
}
|
||||||
mmco_index = i;
|
mmco_index = i;
|
||||||
} else {
|
} else {
|
||||||
if (first_slice)
|
if (first_slice) {
|
||||||
ff_generate_sliding_window_mmcos(h, first_slice);
|
ret = ff_generate_sliding_window_mmcos(h, first_slice);
|
||||||
|
if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
mmco_index = -1;
|
mmco_index = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user