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:
committed by
Andreas Rheinhardt
parent
5da07f18e5
commit
c769050f56
@@ -751,8 +751,7 @@ static av_cold int wmv9_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
v->s.avctx = avctx;
|
v->s.avctx = avctx;
|
||||||
|
|
||||||
if ((ret = ff_vc1_init_common(v)) < 0)
|
ff_vc1_init_common(v);
|
||||||
return ret;
|
|
||||||
ff_vc1dsp_init(&v->vc1dsp);
|
ff_vc1dsp_init(&v->vc1dsp);
|
||||||
|
|
||||||
v->profile = PROFILE_MAIN;
|
v->profile = PROFILE_MAIN;
|
||||||
|
@@ -1695,7 +1695,7 @@ static av_cold void vc1_init_static(void)
|
|||||||
* @param v The VC1Context to initialize
|
* @param v The VC1Context to initialize
|
||||||
* @return Status
|
* @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;
|
static AVOnce init_static_once = AV_ONCE_INIT;
|
||||||
|
|
||||||
@@ -1709,6 +1709,4 @@ av_cold int ff_vc1_init_common(VC1Context *v)
|
|||||||
|
|
||||||
/* VLC tables */
|
/* VLC tables */
|
||||||
ff_thread_once(&init_static_once, vc1_init_static);
|
ff_thread_once(&init_static_once, vc1_init_static);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@@ -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 (VC1Context *v, GetBitContext *gb);
|
||||||
int ff_vc1_parse_frame_header_adv(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);
|
int ff_vc1_decode_init_alloc_tables(VC1Context *v);
|
||||||
void ff_vc1_init_transposed_scantables(VC1Context *v);
|
void ff_vc1_init_transposed_scantables(VC1Context *v);
|
||||||
|
@@ -283,7 +283,8 @@ static av_cold int vc1_parse_init(AVCodecParserContext *s)
|
|||||||
vpc->bytes_to_skip = 0;
|
vpc->bytes_to_skip = 0;
|
||||||
vpc->unesc_index = 0;
|
vpc->unesc_index = 0;
|
||||||
vpc->search_state = NO_MATCH;
|
vpc->search_state = NO_MATCH;
|
||||||
return ff_vc1_init_common(&vpc->v);
|
ff_vc1_init_common(&vpc->v);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVCodecParser ff_vc1_parser = {
|
AVCodecParser ff_vc1_parser = {
|
||||||
|
@@ -434,8 +434,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
v->s.avctx = avctx;
|
v->s.avctx = avctx;
|
||||||
|
|
||||||
if ((ret = ff_vc1_init_common(v)) < 0)
|
ff_vc1_init_common(v);
|
||||||
return ret;
|
|
||||||
|
|
||||||
if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) {
|
if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
Reference in New Issue
Block a user