1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/vc1: Don't pretend ff_vc1_init_common() can fail

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-12-22 17:55:19 +01:00 committed by Andreas Rheinhardt
parent 5da07f18e5
commit c769050f56
5 changed files with 6 additions and 9 deletions

View File

@ -751,8 +751,7 @@ static av_cold int wmv9_init(AVCodecContext *avctx)
v->s.avctx = avctx;
if ((ret = ff_vc1_init_common(v)) < 0)
return ret;
ff_vc1_init_common(v);
ff_vc1dsp_init(&v->vc1dsp);
v->profile = PROFILE_MAIN;

View File

@ -1695,7 +1695,7 @@ static av_cold void vc1_init_static(void)
* @param v The VC1Context to initialize
* @return Status
*/
av_cold int ff_vc1_init_common(VC1Context *v)
av_cold void ff_vc1_init_common(VC1Context *v)
{
static AVOnce init_static_once = AV_ONCE_INIT;
@ -1709,6 +1709,4 @@ av_cold int ff_vc1_init_common(VC1Context *v)
/* VLC tables */
ff_thread_once(&init_static_once, vc1_init_static);
return 0;
}

View File

@ -413,7 +413,7 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex
int ff_vc1_parse_frame_header (VC1Context *v, GetBitContext *gb);
int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb);
int ff_vc1_init_common(VC1Context *v);
void ff_vc1_init_common(VC1Context *v);
int ff_vc1_decode_init_alloc_tables(VC1Context *v);
void ff_vc1_init_transposed_scantables(VC1Context *v);

View File

@ -283,7 +283,8 @@ static av_cold int vc1_parse_init(AVCodecParserContext *s)
vpc->bytes_to_skip = 0;
vpc->unesc_index = 0;
vpc->search_state = NO_MATCH;
return ff_vc1_init_common(&vpc->v);
ff_vc1_init_common(&vpc->v);
return 0;
}
AVCodecParser ff_vc1_parser = {

View File

@ -434,8 +434,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
v->s.avctx = avctx;
if ((ret = ff_vc1_init_common(v)) < 0)
return ret;
ff_vc1_init_common(v);
if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) {
int count = 0;