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
166 }166 }
167}167}
168 168
169int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)169void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d)
170{170{
171 int j, i, c, s, p;171 int j, i, c, s, p;
172 172
@@ -185,6 +185,4 @@ int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) · 12 unmodified lines
185 }185 }
186 }186 }
187 }187 }
188
189 return 0;
190}188}
libavcodec/dv_internal.h+1−1
@@ -32,7 +32,7 @@ typedef struct DVwork_chunk { · 31 unmodified lines
32 uint16_t mb_coordinates[5];32 uint16_t mb_coordinates[5];
33} DVwork_chunk;33} DVwork_chunk;
34 34
35int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);35void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d);
36 36
37static inline int dv_work_pool_size(const AVDVProfile *d)37static inline int dv_work_pool_size(const AVDVProfile *d)
38{38{
libavcodec/dvdec.c+1−5
@@ -637,11 +637,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 636 unmodified lines
637 }637 }
638 638
639 if (sys != s->sys) {639 if (sys != s->sys) {
640 ret = ff_dv_init_dynamic_tables(s->work_chunks, sys);640 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 }
645 dv_init_weight_tables(s, sys);641 dv_init_weight_tables(s, sys);
646 s->sys = sys;642 s->sys = sys;
647 }643 }
libavcodec/dvenc.c+1−5
@@ -93,11 +93,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) · 92 unmodified lines
93 return AVERROR(EINVAL);93 return AVERROR(EINVAL);
94 }94 }
95 95
96 ret = ff_dv_init_dynamic_tables(s->work_chunks, s->sys);96 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 }
101 97
102 memset(&fdsp,0, sizeof(fdsp));98 memset(&fdsp,0, sizeof(fdsp));
103 memset(&mecc,0, sizeof(mecc));99 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