History

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

Andreas Rheinhardt committed 2 years ago

Commit 2d33d6b1 parent f3c8d034 files · +4 −14Browse files

Unified · Split

4 files
  1. libavcodec/dv.c +1 −3
  2. libavcodec/dv_internal.h +1 −1
  3. libavcodec/dvdec.c +1 −5
  4. libavcodec/dvenc.c +1 −5
libavcodec/dv.c+1−3
@@ -166,7 +166,7 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan, · 165 unmodified lines
166166 }
167167 }
168168
169−int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
169+void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
170170 {
171171 int j, i, c, s, p;
172172
@@ -185,6 +185,4 @@ int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) · 12 unmodified lines
185185 }
186186 }
187187 }
188−
189− return 0;
190188 }
libavcodec/dv_internal.h+1−1
@@ -32,7 +32,7 @@ typedef struct DVwork_chunk { · 31 unmodified lines
3232 uint16_t mb_coordinates[5];
3333 } DVwork_chunk;
3434
35−int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);
35+void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);
3636
3737 static inline int dv_work_pool_size(const AVDVProfile *d)
3838 {
libavcodec/dvdec.c+1−5
@@ -637,11 +637,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 636 unmodified lines
637637 }
638638
639639 if (sys != s->sys) {
640− ret = ff_dv_init_dynamic_tables(s->work_chunks, sys);
641− if (ret < 0) {
642− av_log(avctx, AV_LOG_ERROR, "Error initializing the work tables.\n");
643− return ret;
644− }
640+ ff_dv_init_dynamic_tables(s->work_chunks, sys);
645641 dv_init_weight_tables(s, sys);
646642 s->sys = sys;
647643 }
libavcodec/dvenc.c+1−5
@@ -93,11 +93,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) · 92 unmodified lines
9393 return AVERROR(EINVAL);
9494 }
9595
96− ret = ff_dv_init_dynamic_tables(s->work_chunks, s->sys);
97− if (ret < 0) {
98− av_log(avctx, AV_LOG_ERROR, "Error initializing work tables.\n");
99− return ret;
100− }
96+ ff_dv_init_dynamic_tables(s->work_chunks, s->sys);
10197
10298 memset(&fdsp,0, sizeof(fdsp));
10399 memset(&mecc,0, sizeof(mecc));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t