Commit 2d33d6bf authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avcodec/dv: Don't pretend initializing work chunks can fail

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent f3c8d039
...@@ -166,7 +166,7 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan, ...@@ -166,7 +166,7 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan,
} }
} }
int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
{ {
int j, i, c, s, p; int j, i, c, s, p;
...@@ -185,6 +185,4 @@ int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) ...@@ -185,6 +185,4 @@ int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
} }
} }
} }
return 0;
} }
...@@ -32,7 +32,7 @@ typedef struct DVwork_chunk { ...@@ -32,7 +32,7 @@ typedef struct DVwork_chunk {
uint16_t mb_coordinates[5]; uint16_t mb_coordinates[5];
} DVwork_chunk; } DVwork_chunk;
int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d); void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);
static inline int dv_work_pool_size(const AVDVProfile *d) static inline int dv_work_pool_size(const AVDVProfile *d)
{ {
......
...@@ -637,11 +637,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, ...@@ -637,11 +637,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
} }
if (sys != s->sys) { if (sys != s->sys) {
ret = ff_dv_init_dynamic_tables(s->work_chunks, sys); ff_dv_init_dynamic_tables(s->work_chunks, sys);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Error initializing the work tables.\n");
return ret;
}
dv_init_weight_tables(s, sys); dv_init_weight_tables(s, sys);
s->sys = sys; s->sys = sys;
} }
......
...@@ -93,11 +93,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) ...@@ -93,11 +93,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
ret = ff_dv_init_dynamic_tables(s->work_chunks, s->sys); ff_dv_init_dynamic_tables(s->work_chunks, s->sys);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Error initializing work tables.\n");
return ret;
}
memset(&fdsp,0, sizeof(fdsp)); memset(&fdsp,0, sizeof(fdsp));
memset(&mecc,0, sizeof(mecc)); memset(&mecc,0, sizeof(mecc));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment