History

avcodec: Remove redundant setting of AV_FRAME_FLAG_KEY, AV_PICTURE_TYPE_I

This is done generically now.

Andreas Rheinhardt committed 2 years ago

Commit df3cdf41 parent eee88ba74 files · +0 −184Browse files

Unified · Split

74 files
  1. libavcodec/012v.c +0 −3
  2. libavcodec/aic.c +0 −2
  3. libavcodec/aliaspixdec.c +0 −3
  4. libavcodec/asvdec.c +0 −2
  5. libavcodec/avuidec.c +0 −3
  6. libavcodec/bitpacked_dec.c +0 −3
  7. libavcodec/bmp.c +0 −2
  8. libavcodec/brenderpix.c +0 −2
  9. libavcodec/cdxl.c +0 −2
  10. libavcodec/cljrdec.c +0 −2
  11. libavcodec/cllc.c +0 −3
  12. libavcodec/cri.c +0 −3
  13. libavcodec/dds.c +0 −2
  14. libavcodec/dnxhddec.c +0 −2
  15. libavcodec/dvdec.c +0 −2
  16. libavcodec/dxtory.c +0 −2
  17. libavcodec/dxv.c +0 −2
  18. libavcodec/fitsdec.c +0 −3
  19. libavcodec/fraps.c +0 −3
  20. libavcodec/frwu.c +0 −3
  21. libavcodec/hapdec.c +0 −2
  22. libavcodec/hdrdec.c +0 −3
  23. libavcodec/hq_hqa.c +0 −3
  24. libavcodec/hqx.c +0 −3
  25. libavcodec/jpeg2000dec.c +0 −2
  26. libavcodec/lagarith.c +0 −3
  27. libavcodec/lcldec.c +0 −3
  28. libavcodec/leaddec.c +0 −3
  29. libavcodec/loco.c +0 −1
  30. libavcodec/m101.c +0 −2
  31. libavcodec/magicyuv.c +0 −3
  32. libavcodec/mdec.c +0 −2
  33. libavcodec/mpeg12dec.c +0 −2
  34. libavcodec/mscc.c +0 −3
  35. libavcodec/msp2dec.c +0 −3
  36. libavcodec/mvcdec.c +0 −3
  37. libavcodec/mvha.c +0 −2
  38. libavcodec/notchlc.c +0 −3
  39. libavcodec/pgxdec.c +0 −2
  40. libavcodec/pixlet.c +0 −2
  41. libavcodec/pnmdec.c +0 −2
  42. libavcodec/proresdec.c +0 −2
  43. libavcodec/prosumer.c +0 −2
  44. libavcodec/qdrw.c +0 −3
  45. libavcodec/qoidec.c +0 −3
  46. libavcodec/r210dec.c +0 −2
  47. libavcodec/rawdec.c +0 −3
  48. libavcodec/rtv1.c +0 −3
  49. libavcodec/sgidec.c +0 −2
  50. libavcodec/sgirledec.c +0 −3
  51. libavcodec/sheervideo.c +0 −3
  52. libavcodec/speedhqdec.c +0 −1
  53. libavcodec/targa_y216dec.c +0 −3
  54. libavcodec/tiff.c +0 −1
  55. libavcodec/tmv.c +0 −2
  56. libavcodec/truemotion2rt.c +0 −2
  57. libavcodec/utvideodec.c +0 −2
  58. libavcodec/v210dec.c +0 −3
  59. libavcodec/v210x.c +0 −2
  60. libavcodec/v308dec.c +0 −3
  61. libavcodec/v408dec.c +0 −3
  62. libavcodec/v410dec.c +0 −3
  63. libavcodec/vble.c +0 −4
  64. libavcodec/vcr1.c +0 −2
  65. libavcodec/vmixdec.c +0 −3
  66. libavcodec/wbmpdec.c +0 −3
  67. libavcodec/wnv1.c +0 −1
  68. libavcodec/xbmdec.c +0 −3
  69. libavcodec/xl.c +0 −2
  70. libavcodec/xpmdec.c +0 −3
  71. libavcodec/xwddec.c +0 −3
  72. libavcodec/y41pdec.c +0 −3
  73. libavcodec/ylc.c +0 −2
  74. libavcodec/yuv4dec.c +0 −3
libavcodec/012v.c+0−3
@@ -64,9 +64,6 @@ static int zero12v_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 63 unmodified lines
64 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)64 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
65 return ret;65 return ret;
66 66
67 pic->pict_type = AV_PICTURE_TYPE_I;
68 pic->flags |= AV_FRAME_FLAG_KEY;
69
70 line_end = avpkt->data + stride;67 line_end = avpkt->data + stride;
71 for (line = 0; line < avctx->height; line++) {68 for (line = 0; line < avctx->height; line++) {
72 uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000};69 uint16_t y_temp[6] = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000};
libavcodec/aic.c+0−2
@@ -393,8 +393,6 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 392 unmodified lines
393 int slice_size;393 int slice_size;
394 394
395 ctx->frame = frame;395 ctx->frame = frame;
396 ctx->frame->pict_type = AV_PICTURE_TYPE_I;
397 ctx->frame->flags |= AV_FRAME_FLAG_KEY;
398 396
399 off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4);397 off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4);
400 398
libavcodec/aliaspixdec.c+0−3
@@ -69,9 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, · 68 unmodified lines
69 if (ret < 0)69 if (ret < 0)
70 return ret;70 return ret;
71 71
72 f->pict_type = AV_PICTURE_TYPE_I;
73 f->flags |= AV_FRAME_FLAG_KEY;
74
75 x = 0;72 x = 0;
76 y = 1;73 y = 1;
77 out_buf = f->data[0];74 out_buf = f->data[0];
libavcodec/asvdec.c+0−2
@@ -244,8 +244,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 243 unmodified lines
244 244
245 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)245 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
246 return ret;246 return ret;
247 p->pict_type = AV_PICTURE_TYPE_I;
248 p->flags |= AV_FRAME_FLAG_KEY;
249 247
250 if (avctx->codec_id == AV_CODEC_ID_ASV1) {248 if (avctx->codec_id == AV_CODEC_ID_ASV1) {
251 av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size,249 av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size,
libavcodec/avuidec.c+0−3
@@ -71,9 +71,6 @@ static int avui_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 70 unmodified lines
71 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)71 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
72 return ret;72 return ret;
73 73
74 pic->flags |= AV_FRAME_FLAG_KEY;
75 pic->pict_type = AV_PICTURE_TYPE_I;
76
77 if (!interlaced) {74 if (!interlaced) {
78 src += avctx->width * skip;75 src += avctx->width * skip;
79 srca += avctx->width * skip;76 srca += avctx->width * skip;
libavcodec/bitpacked_dec.c+0−3
@@ -130,9 +130,6 @@ static int bitpacked_decode(AVCodecContext *avctx, AVFrame *frame, · 129 unmodified lines
130 if (res)130 if (res)
131 return res;131 return res;
132 132
133 frame->pict_type = AV_PICTURE_TYPE_I;
134 frame->flags |= AV_FRAME_FLAG_KEY;
135
136 *got_frame = 1;133 *got_frame = 1;
137 return buf_size;134 return buf_size;
138 135
libavcodec/bmp.c+0−2
@@ -209,8 +209,6 @@ static int bmp_decode_frame(AVCodecContext *avctx, AVFrame *p, · 208 unmodified lines
209 209
210 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)210 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
211 return ret;211 return ret;
212 p->pict_type = AV_PICTURE_TYPE_I;
213 p->flags |= AV_FRAME_FLAG_KEY;
214 212
215 buf = buf0 + hsize;213 buf = buf0 + hsize;
216 dsize = buf_size - hsize;214 dsize = buf_size - hsize;
libavcodec/brenderpix.c+0−2
@@ -285,8 +285,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 284 unmodified lines
285 bytes_per_scanline,285 bytes_per_scanline,
286 bytes_per_scanline, hdr.height);286 bytes_per_scanline, hdr.height);
287 287
288 frame->pict_type = AV_PICTURE_TYPE_I;
289 frame->flags |= AV_FRAME_FLAG_KEY;
290 *got_frame = 1;288 *got_frame = 1;
291 289
292 return avpkt->size;290 return avpkt->size;
libavcodec/cdxl.c+0−2
@@ -306,8 +306,6 @@ static int cdxl_decode_frame(AVCodecContext *avctx, AVFrame *p, · 305 unmodified lines
306 306
307 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)307 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
308 return ret;308 return ret;
309 p->pict_type = AV_PICTURE_TYPE_I;
310 p->flags |= AV_FRAME_FLAG_KEY;
311 309
312 if (encoding) {310 if (encoding) {
313 av_fast_padded_malloc(&c->new_video, &c->new_video_size,311 av_fast_padded_malloc(&c->new_video, &c->new_video_size,
libavcodec/cljrdec.c+0−2
@@ -50,8 +50,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 49 unmodified lines
50 50
51 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)51 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
52 return ret;52 return ret;
53 p->pict_type = AV_PICTURE_TYPE_I;
54 p->flags |= AV_FRAME_FLAG_KEY;
55 53
56 init_get_bits(&gb, buf, buf_size * 8);54 init_get_bits(&gb, buf, buf_size * 8);
57 55
libavcodec/cllc.c+0−3
@@ -461,9 +461,6 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 460 unmodified lines
461 return AVERROR_INVALIDDATA;461 return AVERROR_INVALIDDATA;
462 }462 }
463 463
464 pic->flags |= AV_FRAME_FLAG_KEY;
465 pic->pict_type = AV_PICTURE_TYPE_I;
466
467 *got_picture_ptr = 1;464 *got_picture_ptr = 1;
468 465
469 return avpkt->size;466 return avpkt->size;
libavcodec/cri.c+0−3
@@ -406,9 +406,6 @@ skip: · 405 unmodified lines
406 }406 }
407 }407 }
408 408
409 p->pict_type = AV_PICTURE_TYPE_I;
410 p->flags |= AV_FRAME_FLAG_KEY;
411
412 *got_frame = 1;409 *got_frame = 1;
413 410
414 return 0;411 return 0;
libavcodec/dds.c+0−2
@@ -711,8 +711,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 710 unmodified lines
711 run_postproc(avctx, frame);711 run_postproc(avctx, frame);
712 712
713 /* Frame is ready to be output. */713 /* Frame is ready to be output. */
714 frame->pict_type = AV_PICTURE_TYPE_I;
715 frame->flags |= AV_FRAME_FLAG_KEY;
716 *got_frame = 1;714 *got_frame = 1;
717 715
718 return avpkt->size;716 return avpkt->size;
libavcodec/dnxhddec.c+0−2
@@ -655,8 +655,6 @@ decode_coding_unit: · 654 unmodified lines
655 if (first_field) {655 if (first_field) {
656 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)656 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
657 return ret;657 return ret;
658 picture->pict_type = AV_PICTURE_TYPE_I;
659 picture->flags |= AV_FRAME_FLAG_KEY;
660 }658 }
661 659
662 ctx->buf_size = buf_size - ctx->data_offset;660 ctx->buf_size = buf_size - ctx->data_offset;
libavcodec/dvdec.c+0−2
@@ -643,8 +643,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 642 unmodified lines
643 }643 }
644 644
645 s->frame = frame;645 s->frame = frame;
646 frame->flags |= AV_FRAME_FLAG_KEY;
647 frame->pict_type = AV_PICTURE_TYPE_I;
648 avctx->pix_fmt = s->sys->pix_fmt;646 avctx->pix_fmt = s->sys->pix_fmt;
649 avctx->framerate = av_inv_q(s->sys->time_base);647 avctx->framerate = av_inv_q(s->sys->time_base);
650 avctx->bit_rate = av_rescale_q(s->sys->frame_size,648 avctx->bit_rate = av_rescale_q(s->sys->frame_size,
libavcodec/dxtory.c+0−2
@@ -863,8 +863,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 862 unmodified lines
863 if (ret)863 if (ret)
864 return ret;864 return ret;
865 865
866 pic->pict_type = AV_PICTURE_TYPE_I;
867 pic->flags |= AV_FRAME_FLAG_KEY;
868 *got_frame = 1;866 *got_frame = 1;
869 867
870 return avpkt->size;868 return avpkt->size;
libavcodec/dxv.c+0−2
@@ -1048,8 +1048,6 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, · 1047 unmodified lines
1048 }1048 }
1049 1049
1050 /* Frame is ready to be output. */1050 /* Frame is ready to be output. */
1051 frame->pict_type = AV_PICTURE_TYPE_I;
1052 frame->flags |= AV_FRAME_FLAG_KEY;
1053 *got_frame = 1;1051 *got_frame = 1;
1054 1052
1055 return avpkt->size;1053 return avpkt->size;
libavcodec/fitsdec.c+0−3
@@ -301,9 +301,6 @@ static int fits_decode_frame(AVCodecContext *avctx, AVFrame *p, · 300 unmodified lines
301 }301 }
302 }302 }
303 303
304 p->flags |= AV_FRAME_FLAG_KEY;
305 p->pict_type = AV_PICTURE_TYPE_I;
306
307 *got_frame = 1;304 *got_frame = 1;
308 305
309 return avpkt->size;306 return avpkt->size;
libavcodec/fraps.c+0−3
@@ -215,9 +215,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, · 214 unmodified lines
215 }215 }
216 }216 }
217 217
218 f->pict_type = AV_PICTURE_TYPE_I;
219 f->flags |= AV_FRAME_FLAG_KEY;
220
221 avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P;218 avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P;
222 avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED219 avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED
223 : AVCOL_RANGE_JPEG;220 : AVCOL_RANGE_JPEG;
libavcodec/frwu.c+0−3
@@ -62,9 +62,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 61 unmodified lines
62 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)62 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
63 return ret;63 return ret;
64 64
65 pic->pict_type = AV_PICTURE_TYPE_I;
66 pic->flags |= AV_FRAME_FLAG_KEY;
67
68 for (field = 0; field < 2; field++) {65 for (field = 0; field < 2; field++) {
69 int i;66 int i;
70 int field_h = (avctx->height + !field) >> 1;67 int field_h = (avctx->height + !field) >> 1;
libavcodec/hapdec.c+0−2
@@ -330,8 +330,6 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, · 329 unmodified lines
330 }330 }
331 331
332 /* Frame is ready to be output */332 /* Frame is ready to be output */
333 frame->pict_type = AV_PICTURE_TYPE_I;
334 frame->flags |= AV_FRAME_FLAG_KEY;
335 *got_frame = 1;333 *got_frame = 1;
336 334
337 return avpkt->size;335 return avpkt->size;
libavcodec/hdrdec.c+0−3
@@ -212,9 +212,6 @@ convert: · 211 unmodified lines
212 }212 }
213 }213 }
214 214
215 p->flags |= AV_FRAME_FLAG_KEY;
216 p->pict_type = AV_PICTURE_TYPE_I;
217
218 *got_frame = 1;215 *got_frame = 1;
219 216
220 return avpkt->size;217 return avpkt->size;
libavcodec/hq_hqa.c+0−3
@@ -366,9 +366,6 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 365 unmodified lines
366 return ret;366 return ret;
367 }367 }
368 368
369 pic->flags |= AV_FRAME_FLAG_KEY;
370 pic->pict_type = AV_PICTURE_TYPE_I;
371
372 *got_frame = 1;369 *got_frame = 1;
373 370
374 return avpkt->size;371 return avpkt->size;
libavcodec/hqx.c+0−3
@@ -504,9 +504,6 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 503 unmodified lines
504 504
505 avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16);505 avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16);
506 506
507 ctx->pic->flags |= AV_FRAME_FLAG_KEY;
508 ctx->pic->pict_type = AV_PICTURE_TYPE_I;
509
510 *got_picture_ptr = 1;507 *got_picture_ptr = 1;
511 508
512 return avpkt->size;509 return avpkt->size;
libavcodec/jpeg2000dec.c+0−2
@@ -2503,8 +2503,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, · 2502 unmodified lines
2503 /* get picture buffer */2503 /* get picture buffer */
2504 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)2504 if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0)
2505 goto end;2505 goto end;
2506 picture->pict_type = AV_PICTURE_TYPE_I;
2507 picture->flags |= AV_FRAME_FLAG_KEY;
2508 2506
2509 if (ret = jpeg2000_read_bitstream_packets(s))2507 if (ret = jpeg2000_read_bitstream_packets(s))
2510 goto end;2508 goto end;
libavcodec/lagarith.c+0−3
@@ -570,9 +570,6 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, · 569 unmodified lines
570 int i, j, planes = 3;570 int i, j, planes = 3;
571 int ret = 0;571 int ret = 0;
572 572
573 p->flags |= AV_FRAME_FLAG_KEY;
574 p->pict_type = AV_PICTURE_TYPE_I;
575
576 frametype = buf[0];573 frametype = buf[0];
577 574
578 offset_gu = AV_RL32(buf + 1);575 offset_gu = AV_RL32(buf + 1);
libavcodec/lcldec.c+0−3
@@ -481,9 +481,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 480 unmodified lines
481 return AVERROR_INVALIDDATA;481 return AVERROR_INVALIDDATA;
482 }482 }
483 483
484 frame->flags |= AV_FRAME_FLAG_KEY;
485 frame->pict_type = AV_PICTURE_TYPE_I;
486
487 *got_frame = 1;484 *got_frame = 1;
488 485
489 /* always report that the buffer was completely consumed */486 /* always report that the buffer was completely consumed */
libavcodec/leaddec.c+0−3
@@ -182,9 +182,6 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, · 181 unmodified lines
182 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)182 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
183 return ret;183 return ret;
184 184
185 frame->flags |= AV_FRAME_FLAG_KEY;
186 frame->pict_type = AV_PICTURE_TYPE_I;
187
188 av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size, avpkt->size - 8);185 av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size, avpkt->size - 8);
189 if (!s->bitstream_buf)186 if (!s->bitstream_buf)
190 return AVERROR(ENOMEM);187 return AVERROR(ENOMEM);
libavcodec/loco.c+0−1
@@ -206,7 +206,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 205 unmodified lines
206 206
207 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)207 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
208 return ret;208 return ret;
209 p->flags |= AV_FRAME_FLAG_KEY;
210 209
211#define ADVANCE_BY_DECODED do { \210#define ADVANCE_BY_DECODED do { \
212 if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \211 if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \
libavcodec/m101.c+0−2
@@ -66,8 +66,6 @@ static int m101_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 65 unmodified lines
66 66
67 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)67 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
68 return ret;68 return ret;
69 frame->pict_type = AV_PICTURE_TYPE_I;
70 frame->flags |= AV_FRAME_FLAG_KEY;
71 if ((avctx->extradata[3*4] & 3) != 3) {69 if ((avctx->extradata[3*4] & 3) != 3) {
72 frame->flags |= AV_FRAME_FLAG_INTERLACED;70 frame->flags |= AV_FRAME_FLAG_INTERLACED;
73 if (avctx->extradata[3*4] & 1)71 if (avctx->extradata[3*4] & 1)
libavcodec/magicyuv.c+0−3
@@ -652,9 +652,6 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, · 651 unmodified lines
652 if (ret < 0)652 if (ret < 0)
653 return ret;653 return ret;
654 654
655 p->pict_type = AV_PICTURE_TYPE_I;
656 p->flags |= AV_FRAME_FLAG_KEY;
657
658 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)655 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
659 return ret;656 return ret;
660 657
libavcodec/mdec.c+0−2
@@ -177,8 +177,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 176 unmodified lines
177 177
178 if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0)178 if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0)
179 return ret;179 return ret;
180 frame->pict_type = AV_PICTURE_TYPE_I;
181 frame->flags |= AV_FRAME_FLAG_KEY;
182 180
183 av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size);181 av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size);
184 if (!a->bitstream_buffer)182 if (!a->bitstream_buffer)
libavcodec/mpeg12dec.c+0−2
@@ -2822,8 +2822,6 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 2821 unmodified lines
2822 if (get_bits_left(gb) != 32)2822 if (get_bits_left(gb) != 32)
2823 return AVERROR_INVALIDDATA;2823 return AVERROR_INVALIDDATA;
2824 2824
2825 frame->pict_type = AV_PICTURE_TYPE_I;
2826 frame->flags |= AV_FRAME_FLAG_KEY;
2827 *got_frame = 1;2825 *got_frame = 1;
2828 2826
2829 return avpkt->size;2827 return avpkt->size;
libavcodec/mscc.c+0−3
@@ -205,9 +205,6 @@ inflate_error: · 204 unmodified lines
205 s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width);205 s->uncomp_buf + s->bpp * j * avctx->width, s->bpp * avctx->width);
206 }206 }
207 207
208 frame->flags |= AV_FRAME_FLAG_KEY;
209 frame->pict_type = AV_PICTURE_TYPE_I;
210
211 *got_frame = 1;208 *got_frame = 1;
212 209
213 return avpkt->size;210 return avpkt->size;
libavcodec/msp2dec.c+0−3
@@ -46,9 +46,6 @@ static int msp2_decode_frame(AVCodecContext *avctx, AVFrame *p, · 45 unmodified lines
46 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)46 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
47 return ret;47 return ret;
48 48
49 p->pict_type = AV_PICTURE_TYPE_I;
50 p->flags |= AV_FRAME_FLAG_KEY;
51
52 bytestream2_init(&idx, buf, 2 * avctx->height);49 bytestream2_init(&idx, buf, 2 * avctx->height);
53 buf += 2 * avctx->height;50 buf += 2 * avctx->height;
54 buf_size -= 2 * avctx->height;51 buf_size -= 2 * avctx->height;
libavcodec/mvcdec.c+0−3
@@ -246,9 +246,6 @@ static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 245 unmodified lines
246 if (ret < 0)246 if (ret < 0)
247 return ret;247 return ret;
248 248
249 frame->pict_type = AV_PICTURE_TYPE_I;
250 frame->flags |= AV_FRAME_FLAG_KEY;
251
252 *got_frame = 1;249 *got_frame = 1;
253 250
254 return avpkt->size;251 return avpkt->size;
libavcodec/mvha.c+0−2
@@ -271,8 +271,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 270 unmodified lines
271 }271 }
272 }272 }
273 273
274 frame->pict_type = AV_PICTURE_TYPE_I;
275 frame->flags |= AV_FRAME_FLAG_KEY;
276 *got_frame = 1;274 *got_frame = 1;
277 275
278 return avpkt->size;276 return avpkt->size;
libavcodec/notchlc.c+0−3
@@ -515,9 +515,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 514 unmodified lines
515 if (ret < 0)515 if (ret < 0)
516 return ret;516 return ret;
517 517
518 p->pict_type = AV_PICTURE_TYPE_I;
519 p->flags |= AV_FRAME_FLAG_KEY;
520
521 *got_frame = 1;518 *got_frame = 1;
522 519
523 return avpkt->size;520 return avpkt->size;
libavcodec/pgxdec.c+0−2
@@ -139,8 +139,6 @@ static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p, · 138 unmodified lines
139 return AVERROR_INVALIDDATA;139 return AVERROR_INVALIDDATA;
140 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)140 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
141 return ret;141 return ret;
142 p->pict_type = AV_PICTURE_TYPE_I;
143 p->flags |= AV_FRAME_FLAG_KEY;
144 avctx->bits_per_raw_sample = depth;142 avctx->bits_per_raw_sample = depth;
145 if (bpp == 8)143 if (bpp == 8)
146 write_frame_8(p, &g, width, height, sign, depth);144 write_frame_8(p, &g, width, height, sign, depth);
libavcodec/pixlet.c+0−2
@@ -667,8 +667,6 @@ static int pixlet_decode_frame(AVCodecContext *avctx, AVFrame *p, · 666 unmodified lines
667 667
668 bytestream2_skip(&ctx->gb, 8);668 bytestream2_skip(&ctx->gb, 8);
669 669
670 p->pict_type = AV_PICTURE_TYPE_I;
671 p->flags |= AV_FRAME_FLAG_KEY;
672 p->color_range = AVCOL_RANGE_JPEG;670 p->color_range = AVCOL_RANGE_JPEG;
673 671
674 ret = ff_thread_get_buffer(avctx, p, 0);672 ret = ff_thread_get_buffer(avctx, p, 0);
libavcodec/pnmdec.c+0−2
@@ -64,8 +64,6 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 63 unmodified lines
64 64
65 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)65 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
66 return ret;66 return ret;
67 p->pict_type = AV_PICTURE_TYPE_I;
68 p->flags |= AV_FRAME_FLAG_KEY;
69 avctx->bits_per_raw_sample = av_log2(s->maxval) + 1;67 avctx->bits_per_raw_sample = av_log2(s->maxval) + 1;
70 68
71 switch (avctx->pix_fmt) {69 switch (avctx->pix_fmt) {
libavcodec/proresdec.c+0−2
@@ -787,8 +787,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 786 unmodified lines
787 }787 }
788 788
789 ctx->frame = frame;789 ctx->frame = frame;
790 ctx->frame->pict_type = AV_PICTURE_TYPE_I;
791 ctx->frame->flags |= AV_FRAME_FLAG_KEY;
792 ctx->first_field = 1;790 ctx->first_field = 1;
793 791
794 buf += 8;792 buf += 8;
libavcodec/prosumer.c+0−2
@@ -194,8 +194,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 193 unmodified lines
194 }194 }
195 }195 }
196 196
197 frame->pict_type = AV_PICTURE_TYPE_I;
198 frame->flags |= AV_FRAME_FLAG_KEY;
199 *got_frame = 1;197 *got_frame = 1;
200 198
201 return avpkt->size;199 return avpkt->size;
libavcodec/qdrw.c+0−3
@@ -506,9 +506,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 505 unmodified lines
506 }506 }
507 507
508 if (*got_frame) {508 if (*got_frame) {
509 p->pict_type = AV_PICTURE_TYPE_I;
510 p->flags |= AV_FRAME_FLAG_KEY;
511
512 return avpkt->size;509 return avpkt->size;
513 } else {510 } else {
514 av_log(avctx, AV_LOG_ERROR, "Frame contained no usable data\n");511 av_log(avctx, AV_LOG_ERROR, "Frame contained no usable data\n");
libavcodec/qoidec.c+0−3
@@ -106,9 +106,6 @@ static int qoi_decode_frame(AVCodecContext *avctx, AVFrame *p, · 105 unmodified lines
106 memcpy(&dst[off_x * channels], px, channels);106 memcpy(&dst[off_x * channels], px, channels);
107 }107 }
108 108
109 p->flags |= AV_FRAME_FLAG_KEY;
110 p->pict_type = AV_PICTURE_TYPE_I;
111
112 *got_frame = 1;109 *got_frame = 1;
113 110
114 return avpkt->size;111 return avpkt->size;
libavcodec/r210dec.c+0−2
@@ -56,8 +56,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 55 unmodified lines
56 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)56 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
57 return ret;57 return ret;
58 58
59 pic->pict_type = AV_PICTURE_TYPE_I;
60 pic->flags |= AV_FRAME_FLAG_KEY;
61 g_line = pic->data[0];59 g_line = pic->data[0];
62 b_line = pic->data[1];60 b_line = pic->data[1];
63 r_line = pic->data[2];61 r_line = pic->data[2];
libavcodec/rawdec.c+0−3
@@ -225,9 +225,6 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, · 224 unmodified lines
225 225
226 need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp;226 need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp;
227 227
228 frame->pict_type = AV_PICTURE_TYPE_I;
229 frame->flags |= AV_FRAME_FLAG_KEY;
230
231 res = ff_decode_frame_props(avctx, frame);228 res = ff_decode_frame_props(avctx, frame);
232 if (res < 0)229 if (res < 0)
233 return res;230 return res;
libavcodec/rtv1.c+0−3
@@ -132,9 +132,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 131 unmodified lines
132 if (ret < 0)132 if (ret < 0)
133 return ret;133 return ret;
134 134
135 p->pict_type = AV_PICTURE_TYPE_I;
136 p->flags |= AV_FRAME_FLAG_KEY;
137
138 *got_frame = 1;135 *got_frame = 1;
139 136
140 return avpkt->size;137 return avpkt->size;
libavcodec/sgidec.c+0−2
@@ -248,8 +248,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 247 unmodified lines
248 MAP(2, 1);248 MAP(2, 1);
249 break;249 break;
250 }250 }
251 p->pict_type = AV_PICTURE_TYPE_I;
252 p->flags |= AV_FRAME_FLAG_KEY;
253 251
254 /* Skip header. */252 /* Skip header. */
255 bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET);253 bytestream2_seek(&g, SGI_HEADER_SIZE, SEEK_SET);
libavcodec/sgirledec.c+0−3
@@ -123,9 +123,6 @@ static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 122 unmodified lines
123 if (ret < 0)123 if (ret < 0)
124 return ret;124 return ret;
125 125
126 frame->pict_type = AV_PICTURE_TYPE_I;
127 frame->flags |= AV_FRAME_FLAG_KEY;
128
129 *got_frame = 1;126 *got_frame = 1;
130 127
131 return avpkt->size;128 return avpkt->size;
libavcodec/sheervideo.c+0−3
@@ -1972,9 +1972,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 1971 unmodified lines
1972 return AVERROR_INVALIDDATA;1972 return AVERROR_INVALIDDATA;
1973 }1973 }
1974 1974
1975 p->pict_type = AV_PICTURE_TYPE_I;
1976 p->flags |= AV_FRAME_FLAG_KEY;
1977
1978 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)1975 if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0)
1979 return ret;1976 return ret;
1980 1977
libavcodec/speedhqdec.c+0−1
@@ -440,7 +440,6 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 439 unmodified lines
440 if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) {440 if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) {
441 return ret;441 return ret;
442 }442 }
443 frame->flags |= AV_FRAME_FLAG_KEY;
444 443
445 if (second_field_offset == 4 || second_field_offset == (buf_size-4)) {444 if (second_field_offset == 4 || second_field_offset == (buf_size-4)) {
446 /*445 /*
libavcodec/targa_y216dec.c+0−3
@@ -47,9 +47,6 @@ static int y216_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 46 unmodified lines
47 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)47 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
48 return ret;48 return ret;
49 49
50 pic->flags |= AV_FRAME_FLAG_KEY;
51 pic->pict_type = AV_PICTURE_TYPE_I;
52
53 y = (uint16_t *)pic->data[0];50 y = (uint16_t *)pic->data[0];
54 u = (uint16_t *)pic->data[1];51 u = (uint16_t *)pic->data[1];
55 v = (uint16_t *)pic->data[2];52 v = (uint16_t *)pic->data[2];
libavcodec/tiff.c+0−1
@@ -2381,7 +2381,6 @@ again: · 2380 unmodified lines
2381 }2381 }
2382 }2382 }
2383 2383
2384 p->flags |= AV_FRAME_FLAG_KEY;
2385 *got_frame = 1;2384 *got_frame = 1;
2386 2385
2387 return avpkt->size;2386 return avpkt->size;
libavcodec/tmv.c+0−2
@@ -56,8 +56,6 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 55 unmodified lines
56 return AVERROR_INVALIDDATA;56 return AVERROR_INVALIDDATA;
57 }57 }
58 58
59 frame->pict_type = AV_PICTURE_TYPE_I;
60 frame->flags |= AV_FRAME_FLAG_KEY;
61 dst = frame->data[0];59 dst = frame->data[0];
62 60
63#if FF_API_PALETTE_HAS_CHANGED61#if FF_API_PALETTE_HAS_CHANGED
libavcodec/truemotion2rt.c+0−2
@@ -201,8 +201,6 @@ static int truemotion2rt_decode_frame(AVCodecContext *avctx, AVFrame *p, · 200 unmodified lines
201 dst += p->linesize[2];201 dst += p->linesize[2];
202 }202 }
203 203
204 p->pict_type = AV_PICTURE_TYPE_I;
205 p->flags |= AV_FRAME_FLAG_KEY;
206 *got_frame = 1;204 *got_frame = 1;
207 205
208 return avpkt->size;206 return avpkt->size;
libavcodec/utvideodec.c+0−2
@@ -890,8 +890,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 889 unmodified lines
890 break;890 break;
891 }891 }
892 892
893 frame->flags |= AV_FRAME_FLAG_KEY;
894 frame->pict_type = AV_PICTURE_TYPE_I;
895 if (c->interlaced)893 if (c->interlaced)
896 frame->flags |= AV_FRAME_FLAG_INTERLACED;894 frame->flags |= AV_FRAME_FLAG_INTERLACED;
897 895
libavcodec/v210dec.c+0−3
@@ -187,9 +187,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 186 unmodified lines
187 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)187 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
188 return ret;188 return ret;
189 189
190 pic->pict_type = AV_PICTURE_TYPE_I;
191 pic->flags |= AV_FRAME_FLAG_KEY;
192
193 if (stride) {190 if (stride) {
194 td.stride = stride;191 td.stride = stride;
195 td.buf = psrc;192 td.buf = psrc;
libavcodec/v210x.c+0−2
@@ -61,8 +61,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, · 60 unmodified lines
61 udst = (uint16_t *)pic->data[1];61 udst = (uint16_t *)pic->data[1];
62 vdst = (uint16_t *)pic->data[2];62 vdst = (uint16_t *)pic->data[2];
63 yend = ydst + width;63 yend = ydst + width;
64 pic->pict_type = AV_PICTURE_TYPE_I;
65 pic->flags |= AV_FRAME_FLAG_KEY;
66 64
67 for (;;) {65 for (;;) {
68 uint32_t v = av_be2ne32(*src++);66 uint32_t v = av_be2ne32(*src++);
libavcodec/v308dec.c+0−3
@@ -48,9 +48,6 @@ static int v308_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 47 unmodified lines
48 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)48 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
49 return ret;49 return ret;
50 50
51 pic->flags |= AV_FRAME_FLAG_KEY;
52 pic->pict_type = AV_PICTURE_TYPE_I;
53
54 y = pic->data[0];51 y = pic->data[0];
55 u = pic->data[1];52 u = pic->data[1];
56 v = pic->data[2];53 v = pic->data[2];
libavcodec/v408dec.c+0−3
@@ -45,9 +45,6 @@ static int v408_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 44 unmodified lines
45 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)45 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
46 return ret;46 return ret;
47 47
48 pic->flags |= AV_FRAME_FLAG_KEY;
49 pic->pict_type = AV_PICTURE_TYPE_I;
50
51 y = pic->data[0];48 y = pic->data[0];
52 u = pic->data[1];49 u = pic->data[1];
53 v = pic->data[2];50 v = pic->data[2];
libavcodec/v410dec.c+0−3
@@ -102,9 +102,6 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 101 unmodified lines
102 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)102 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
103 return ret;103 return ret;
104 104
105 pic->flags |= AV_FRAME_FLAG_KEY;
106 pic->pict_type = AV_PICTURE_TYPE_I;
107
108 td.buf = src;105 td.buf = src;
109 td.frame = pic;106 td.frame = pic;
110 avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count);107 avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count);
libavcodec/vble.c+0−4
@@ -134,10 +134,6 @@ static int vble_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 133 unmodified lines
134 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)134 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
135 return ret;135 return ret;
136 136
137 /* Set flags */
138 pic->flags |= AV_FRAME_FLAG_KEY;
139 pic->pict_type = AV_PICTURE_TYPE_I;
140
141 /* Version should always be 1 */137 /* Version should always be 1 */
142 version = AV_RL32(src);138 version = AV_RL32(src);
143 139
libavcodec/vcr1.c+0−2
@@ -62,8 +62,6 @@ static int vcr1_decode_frame(AVCodecContext *avctx, AVFrame *p, · 61 unmodified lines
62 62
63 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)63 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
64 return ret;64 return ret;
65 p->pict_type = AV_PICTURE_TYPE_I;
66 p->flags |= AV_FRAME_FLAG_KEY;
67 65
68 for (i = 0; i < 16; i++) {66 for (i = 0; i < 16; i++) {
69 a->delta[i] = *bytestream++;67 a->delta[i] = *bytestream++;
libavcodec/vmixdec.c+0−3
@@ -289,9 +289,6 @@ static int decode_frame(AVCodecContext *avctx, · 288 unmodified lines
289 289
290 avctx->execute2(avctx, decode_slices, frame, NULL, s->nb_slices);290 avctx->execute2(avctx, decode_slices, frame, NULL, s->nb_slices);
291 291
292 frame->pict_type = AV_PICTURE_TYPE_I;
293 frame->flags |= AV_FRAME_FLAG_KEY;
294
295 *got_frame = 1;292 *got_frame = 1;
296 293
297 return avpkt->size;294 return avpkt->size;
libavcodec/wbmpdec.c+0−3
@@ -74,9 +74,6 @@ static int wbmp_decode_frame(AVCodecContext *avctx, AVFrame *p, · 73 unmodified lines
74 else74 else
75 readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer);75 readbits(p->data[0], width, height, p->linesize[0], gb.buffer, gb.buffer_end - gb.buffer);
76 76
77 p->flags |= AV_FRAME_FLAG_KEY;
78 p->pict_type = AV_PICTURE_TYPE_I;
79
80 *got_frame = 1;77 *got_frame = 1;
81 78
82 return buf_size;79 return buf_size;
libavcodec/wnv1.c+0−1
@@ -69,7 +69,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 68 unmodified lines
69 69
70 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)70 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
71 return ret;71 return ret;
72 p->flags |= AV_FRAME_FLAG_KEY;
73 72
74 if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0)73 if ((ret = init_get_bits8(&gb, buf + 8, buf_size - 8)) < 0)
75 return ret;74 return ret;
libavcodec/xbmdec.c+0−3
@@ -135,9 +135,6 @@ static int xbm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 134 unmodified lines
135 }135 }
136 }136 }
137 137
138 p->flags |= AV_FRAME_FLAG_KEY;
139 p->pict_type = AV_PICTURE_TYPE_I;
140
141 *got_frame = 1;138 *got_frame = 1;
142 139
143 return avpkt->size;140 return avpkt->size;
libavcodec/xl.c+0−2
@@ -59,8 +59,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 58 unmodified lines
59 59
60 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)60 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
61 return ret;61 return ret;
62 p->pict_type = AV_PICTURE_TYPE_I;
63 p->flags |= AV_FRAME_FLAG_KEY;
64 62
65 Y = p->data[0];63 Y = p->data[0];
66 U = p->data[1];64 U = p->data[1];
libavcodec/xpmdec.c+0−3
@@ -429,9 +429,6 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 428 unmodified lines
429 ptr += mod_strcspn(ptr, ",") + 1;429 ptr += mod_strcspn(ptr, ",") + 1;
430 }430 }
431 431
432 p->flags |= AV_FRAME_FLAG_KEY;
433 p->pict_type = AV_PICTURE_TYPE_I;
434
435 *got_frame = 1;432 *got_frame = 1;
436 433
437 return avpkt->size;434 return avpkt->size;
libavcodec/xwddec.c+0−3
@@ -216,9 +216,6 @@ static int xwd_decode_frame(AVCodecContext *avctx, AVFrame *p, · 215 unmodified lines
216 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)216 if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
217 return ret;217 return ret;
218 218
219 p->flags |= AV_FRAME_FLAG_KEY;
220 p->pict_type = AV_PICTURE_TYPE_I;
221
222 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {219 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
223 uint32_t *dst = (uint32_t *)p->data[1];220 uint32_t *dst = (uint32_t *)p->data[1];
224 uint8_t red, green, blue;221 uint8_t red, green, blue;
libavcodec/y41pdec.c+0−3
@@ -51,9 +51,6 @@ static int y41p_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 50 unmodified lines
51 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)51 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
52 return ret;52 return ret;
53 53
54 pic->flags |= AV_FRAME_FLAG_KEY;
55 pic->pict_type = AV_PICTURE_TYPE_I;
56
57 for (i = avctx->height - 1; i >= 0 ; i--) {54 for (i = avctx->height - 1; i >= 0 ; i--) {
58 y = &pic->data[0][i * pic->linesize[0]];55 y = &pic->data[0][i * pic->linesize[0]];
59 u = &pic->data[1][i * pic->linesize[1]];56 u = &pic->data[1][i * pic->linesize[1]];
libavcodec/ylc.c+0−2
@@ -426,8 +426,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p, · 425 unmodified lines
426 dst += p->linesize[0];426 dst += p->linesize[0];
427 }427 }
428 428
429 p->pict_type = AV_PICTURE_TYPE_I;
430 p->flags |= AV_FRAME_FLAG_KEY;
431 *got_frame = 1;429 *got_frame = 1;
432 430
433 return avpkt->size;431 return avpkt->size;
libavcodec/yuv4dec.c+0−3
@@ -46,9 +46,6 @@ static int yuv4_decode_frame(AVCodecContext *avctx, AVFrame *pic, · 45 unmodified lines
46 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)46 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
47 return ret;47 return ret;
48 48
49 pic->flags |= AV_FRAME_FLAG_KEY;
50 pic->pict_type = AV_PICTURE_TYPE_I;
51
52 y = pic->data[0];49 y = pic->data[0];
53 u = pic->data[1];50 u = pic->data[1];
54 v = pic->data[2];51 v = pic->data[2];

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