History

avcodec/tiff: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM

Paul B Mahol committed 4 years ago

Commit 14524451 parent c0771051 file · +8 −3Browse files

Unified · Split

libavcodec/tiff.c+8−3
@@ -1209,6 +1209,10 @@ static int init_image(TiffContext *s, AVFrame *frame) · 1208 unmodified lines
1209 if (ret < 0)1209 if (ret < 0)
1210 return ret;1210 return ret;
1211 }1211 }
1212
1213 if (s->avctx->skip_frame >= AVDISCARD_ALL)
1214 return 0;
1215
1212 if ((ret = ff_thread_get_buffer(s->avctx, frame, 0)) < 0)1216 if ((ret = ff_thread_get_buffer(s->avctx, frame, 0)) < 0)
1213 return ret;1217 return ret;
1214 if (s->avctx->pix_fmt == AV_PIX_FMT_PAL8) {1218 if (s->avctx->pix_fmt == AV_PIX_FMT_PAL8) {
@@ -1222,7 +1226,7 @@ static int init_image(TiffContext *s, AVFrame *frame) · 7 unmodified lines
1222 pal[i] = 0xFFU << 24 | i * 255 / ((1<<s->bpp) - 1) * 0x010101;1226 pal[i] = 0xFFU << 24 | i * 255 / ((1<<s->bpp) - 1) * 0x010101;
1223 }1227 }
1224 }1228 }
1225 return 0;1229 return 1;
1226}1230}
1227 1231
1228static void set_sar(TiffContext *s, unsigned tag, unsigned num, unsigned den)1232static void set_sar(TiffContext *s, unsigned tag, unsigned num, unsigned den)
@@ -2089,7 +2093,7 @@ again: · 860 unmodified lines
2089 }2093 }
2090 2094
2091 /* now we have the data and may start decoding */2095 /* now we have the data and may start decoding */
2092 if ((ret = init_image(s, p)) < 0)2096 if ((ret = init_image(s, p)) <= 0)
2093 return ret;2097 return ret;
2094 2098
2095 if (!s->is_tiled || has_strip_bits) {2099 if (!s->is_tiled || has_strip_bits) {
@@ -2382,6 +2386,7 @@ const FFCodec ff_tiff_decoder = { · 286 unmodified lines
2382 .close = tiff_end,2386 .close = tiff_end,
2383 FF_CODEC_DECODE_CB(decode_frame),2387 FF_CODEC_DECODE_CB(decode_frame),
2384 .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,2388 .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
2385 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_ICC_PROFILES,2389 .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_ICC_PROFILES |
2390 FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
2386 .p.priv_class = &tiff_decoder_class,2391 .p.priv_class = &tiff_decoder_class,
2387};2392};

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