Showing the changes to libavcodec (13 of 16 files). Show all
Unified · Split
| @@ -1353,22 +1353,6 @@ typedef struct AVCodecContext { · 1352 unmodified lines | |||
| 1353 | */ | 1353 | */ |
| 1354 | int err_recognition; | 1354 | int err_recognition; |
| 1355 | 1355 | ||
| 1356 | #if FF_API_REORDERED_OPAQUE | ||
| 1357 | /** | ||
| 1358 | * opaque 64-bit number (generally a PTS) that will be reordered and | ||
| 1359 | * output in AVFrame.reordered_opaque | ||
| 1360 | * - encoding: Set by libavcodec to the reordered_opaque of the input | ||
| 1361 | * frame corresponding to the last returned packet. Only | ||
| 1362 | * supported by encoders with the | ||
| 1363 | * AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability. | ||
| 1364 | * - decoding: Set by user. | ||
| 1365 | * | ||
| 1366 | * @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead | ||
| 1367 | */ | ||
| 1368 | attribute_deprecated | ||
| 1369 | int64_t reordered_opaque; | ||
| 1370 | #endif | ||
| 1371 | |||
| 1372 | /** | 1356 | /** |
| 1373 | * Hardware accelerator in use | 1357 | * Hardware accelerator in use |
| 1374 | * - encoding: unused. | 1358 | * - encoding: unused. |
| @@ -1474,11 +1474,6 @@ FF_DISABLE_DEPRECATION_WARNINGS · 1473 unmodified lines | |||
| 1474 | FF_ENABLE_DEPRECATION_WARNINGS | 1474 | FF_ENABLE_DEPRECATION_WARNINGS |
| 1475 | #endif | 1475 | #endif |
| 1476 | } | 1476 | } |
| 1477 | #if FF_API_REORDERED_OPAQUE | ||
| 1478 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 1479 | frame->reordered_opaque = avctx->reordered_opaque; | ||
| 1480 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 1481 | #endif | ||
| 1482 | 1477 | ||
| 1483 | ret = fill_frame_props(avctx, frame); | 1478 | ret = fill_frame_props(avctx, frame); |
| 1484 | if (ret < 0) | 1479 | if (ret < 0) |
| @@ -234,12 +234,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 233 unmodified lines | |||
| 234 | int ff_encode_reordered_opaque(AVCodecContext *avctx, | 234 | int ff_encode_reordered_opaque(AVCodecContext *avctx, |
| 235 | AVPacket *pkt, const AVFrame *frame) | 235 | AVPacket *pkt, const AVFrame *frame) |
| 236 | { | 236 | { |
| 237 | #if FF_API_REORDERED_OPAQUE | ||
| 238 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 239 | avctx->reordered_opaque = frame->reordered_opaque; | ||
| 240 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 241 | #endif | ||
| 242 | |||
| 243 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 237 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 244 | int ret = av_buffer_replace(&pkt->opaque_ref, frame->opaque_ref); | 238 | int ret = av_buffer_replace(&pkt->opaque_ref, frame->opaque_ref); |
| 245 | if (ret < 0) | 239 | if (ret < 0) |
| @@ -298,9 +298,6 @@ static void libdav1d_flush(AVCodecContext *c) · 297 unmodified lines | |||
| 298 | 298 | ||
| 299 | typedef struct OpaqueData { | 299 | typedef struct OpaqueData { |
| 300 | void *pkt_orig_opaque; | 300 | void *pkt_orig_opaque; |
| 301 | #if FF_API_REORDERED_OPAQUE | ||
| 302 | int64_t reordered_opaque; | ||
| 303 | #endif | ||
| 304 | } OpaqueData; | 301 | } OpaqueData; |
| 305 | 302 | ||
| 306 | static void libdav1d_data_free(const uint8_t *data, void *opaque) { | 303 | static void libdav1d_data_free(const uint8_t *data, void *opaque) { |
| @@ -346,12 +343,7 @@ static int libdav1d_receive_frame_internal(AVCodecContext *c, Dav1dPicture *p) · 39 unmodified lines | |||
| 346 | 343 | ||
| 347 | pkt->buf = NULL; | 344 | pkt->buf = NULL; |
| 348 | 345 | ||
| 349 | FF_DISABLE_DEPRECATION_WARNINGS | 346 | if (pkt->opaque && (c->flags & AV_CODEC_FLAG_COPY_OPAQUE)) { |
| 350 | if ( | ||
| 351 | #if FF_API_REORDERED_OPAQUE | ||
| 352 | c->reordered_opaque != AV_NOPTS_VALUE || | ||
| 353 | #endif | ||
| 354 | (pkt->opaque && (c->flags & AV_CODEC_FLAG_COPY_OPAQUE))) { | ||
| 355 | od = av_mallocz(sizeof(*od)); | 347 | od = av_mallocz(sizeof(*od)); |
| 356 | if (!od) { | 348 | if (!od) { |
| 357 | av_packet_free(&pkt); | 349 | av_packet_free(&pkt); |
| @@ -359,10 +351,6 @@ FF_DISABLE_DEPRECATION_WARNINGS · 1 unmodified line | |||
| 359 | return AVERROR(ENOMEM); | 351 | return AVERROR(ENOMEM); |
| 360 | } | 352 | } |
| 361 | od->pkt_orig_opaque = pkt->opaque; | 353 | od->pkt_orig_opaque = pkt->opaque; |
| 362 | #if FF_API_REORDERED_OPAQUE | ||
| 363 | od->reordered_opaque = c->reordered_opaque; | ||
| 364 | #endif | ||
| 365 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 366 | } | 354 | } |
| 367 | pkt->opaque = od; | 355 | pkt->opaque = od; |
| 368 | 356 | ||
| @@ -464,14 +452,6 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) · 95 unmodified lines | |||
| 464 | 452 | ||
| 465 | pkt = (AVPacket *)p->m.user_data.data; | 453 | pkt = (AVPacket *)p->m.user_data.data; |
| 466 | od = pkt->opaque; | 454 | od = pkt->opaque; |
| 467 | #if FF_API_REORDERED_OPAQUE | ||
| 468 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 469 | if (od && od->reordered_opaque != AV_NOPTS_VALUE) | ||
| 470 | frame->reordered_opaque = od->reordered_opaque; | ||
| 471 | else | ||
| 472 | frame->reordered_opaque = AV_NOPTS_VALUE; | ||
| 473 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 474 | #endif | ||
| 475 | 455 | ||
| 476 | // restore the original user opaque value for | 456 | // restore the original user opaque value for |
| 477 | // ff_decode_frame_props_from_pkt() | 457 | // ff_decode_frame_props_from_pkt() |
| @@ -57,9 +57,6 @@ typedef struct librav1eContext { · 56 unmodified lines | |||
| 57 | typedef struct FrameData { | 57 | typedef struct FrameData { |
| 58 | int64_t pts; | 58 | int64_t pts; |
| 59 | int64_t duration; | 59 | int64_t duration; |
| 60 | #if FF_API_REORDERED_OPAQUE | ||
| 61 | int64_t reordered_opaque; | ||
| 62 | #endif | ||
| 63 | 60 | ||
| 64 | void *frame_opaque; | 61 | void *frame_opaque; |
| 65 | AVBufferRef *frame_opaque_ref; | 62 | AVBufferRef *frame_opaque_ref; |
| @@ -472,11 +469,6 @@ static int librav1e_receive_packet(AVCodecContext *avctx, AVPacket *pkt) · 406 unmodified lines | |||
| 472 | } | 469 | } |
| 473 | fd->pts = frame->pts; | 470 | fd->pts = frame->pts; |
| 474 | fd->duration = frame->duration; | 471 | fd->duration = frame->duration; |
| 475 | #if FF_API_REORDERED_OPAQUE | ||
| 476 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 477 | fd->reordered_opaque = frame->reordered_opaque; | ||
| 478 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 479 | #endif | ||
| 480 | 472 | ||
| 481 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 473 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 482 | fd->frame_opaque = frame->opaque; | 474 | fd->frame_opaque = frame->opaque; |
| @@ -583,11 +575,6 @@ retry: · 100 unmodified lines | |||
| 583 | fd = rpkt->opaque; | 575 | fd = rpkt->opaque; |
| 584 | pkt->pts = pkt->dts = fd->pts; | 576 | pkt->pts = pkt->dts = fd->pts; |
| 585 | pkt->duration = fd->duration; | 577 | pkt->duration = fd->duration; |
| 586 | #if FF_API_REORDERED_OPAQUE | ||
| 587 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 588 | avctx->reordered_opaque = fd->reordered_opaque; | ||
| 589 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 590 | #endif | ||
| 591 | 578 | ||
| 592 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 579 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 593 | pkt->opaque = fd->frame_opaque; | 580 | pkt->opaque = fd->frame_opaque; |
| @@ -68,9 +68,6 @@ typedef struct FrameData { · 67 unmodified lines | |||
| 68 | int64_t pts; | 68 | int64_t pts; |
| 69 | int64_t duration; | 69 | int64_t duration; |
| 70 | 70 | ||
| 71 | #if FF_API_REORDERED_OPAQUE | ||
| 72 | int64_t reordered_opaque; | ||
| 73 | #endif | ||
| 74 | void *frame_opaque; | 71 | void *frame_opaque; |
| 75 | AVBufferRef *frame_opaque_ref; | 72 | AVBufferRef *frame_opaque_ref; |
| 76 | 73 | ||
| @@ -383,11 +380,6 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo *fifo, · 306 unmodified lines | |||
| 383 | if (ret < 0) | 380 | if (ret < 0) |
| 384 | goto fail; | 381 | goto fail; |
| 385 | } | 382 | } |
| 386 | #if FF_API_REORDERED_OPAQUE | ||
| 387 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 388 | fd.reordered_opaque = frame->reordered_opaque; | ||
| 389 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 390 | #endif | ||
| 391 | 383 | ||
| 392 | ret = av_fifo_write(fifo, &fd, 1); | 384 | ret = av_fifo_write(fifo, &fd, 1); |
| 393 | if (ret < 0) | 385 | if (ret < 0) |
| @@ -414,12 +406,6 @@ static int frame_data_apply(AVCodecContext *avctx, AVFifo *fifo, AVPacket *pkt) · 20 unmodified lines | |||
| 414 | goto skip; | 406 | goto skip; |
| 415 | } | 407 | } |
| 416 | 408 | ||
| 417 | #if FF_API_REORDERED_OPAQUE | ||
| 418 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 419 | avctx->reordered_opaque = fd.reordered_opaque; | ||
| 420 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 421 | #endif | ||
| 422 | |||
| 423 | pkt->duration = fd.duration; | 409 | pkt->duration = fd.duration; |
| 424 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 410 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 425 | pkt->opaque = fd.frame_opaque; | 411 | pkt->opaque = fd.frame_opaque; |
| @@ -39,9 +39,6 @@ typedef struct LibWebPAnimContext { · 38 unmodified lines | |||
| 39 | int64_t first_frame_pts; // pts of the first encoded frame. | 39 | int64_t first_frame_pts; // pts of the first encoded frame. |
| 40 | int64_t end_pts; // pts + duration of the last frame | 40 | int64_t end_pts; // pts + duration of the last frame |
| 41 | 41 | ||
| 42 | #if FF_API_REORDERED_OPAQUE | ||
| 43 | int64_t reordered_opaque; | ||
| 44 | #endif | ||
| 45 | void *first_frame_opaque; | 42 | void *first_frame_opaque; |
| 46 | AVBufferRef *first_frame_opaque_ref; | 43 | AVBufferRef *first_frame_opaque_ref; |
| 47 | 44 | ||
| @@ -92,11 +89,6 @@ static int libwebp_anim_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 44 unmodified lines | |||
| 92 | if (pkt->pts != AV_NOPTS_VALUE && s->end_pts > pkt->pts) | 89 | if (pkt->pts != AV_NOPTS_VALUE && s->end_pts > pkt->pts) |
| 93 | pkt->duration = s->end_pts - pkt->pts; | 90 | pkt->duration = s->end_pts - pkt->pts; |
| 94 | 91 | ||
| 95 | #if FF_API_REORDERED_OPAQUE | ||
| 96 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 97 | avctx->reordered_opaque = s->reordered_opaque; | ||
| 98 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 99 | #endif | ||
| 100 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 92 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 101 | pkt->opaque = s->first_frame_opaque; | 93 | pkt->opaque = s->first_frame_opaque; |
| 102 | pkt->opaque_ref = s->first_frame_opaque_ref; | 94 | pkt->opaque_ref = s->first_frame_opaque_ref; |
| @@ -134,11 +126,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 31 unmodified lines | |||
| 134 | 126 | ||
| 135 | if (!avctx->frame_num) { | 127 | if (!avctx->frame_num) { |
| 136 | s->first_frame_pts = frame->pts; | 128 | s->first_frame_pts = frame->pts; |
| 137 | #if FF_API_REORDERED_OPAQUE | ||
| 138 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 139 | s->reordered_opaque = frame->reordered_opaque; | ||
| 140 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 141 | #endif | ||
| 142 | 129 | ||
| 143 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 130 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 144 | s->first_frame_opaque = frame->opaque; | 131 | s->first_frame_opaque = frame->opaque; |
| @@ -54,9 +54,6 @@ · 53 unmodified lines | |||
| 54 | #define MB_CEIL(x) MB_FLOOR((x) + (MB_SIZE - 1)) | 54 | #define MB_CEIL(x) MB_FLOOR((x) + (MB_SIZE - 1)) |
| 55 | 55 | ||
| 56 | typedef struct X264Opaque { | 56 | typedef struct X264Opaque { |
| 57 | #if FF_API_REORDERED_OPAQUE | ||
| 58 | int64_t reordered_opaque; | ||
| 59 | #endif | ||
| 60 | int64_t wallclock; | 57 | int64_t wallclock; |
| 61 | int64_t duration; | 58 | int64_t duration; |
| 62 | 59 | ||
| @@ -512,11 +509,6 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, · 449 unmodified lines | |||
| 512 | goto fail; | 509 | goto fail; |
| 513 | } | 510 | } |
| 514 | 511 | ||
| 515 | #if FF_API_REORDERED_OPAQUE | ||
| 516 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 517 | opaque->reordered_opaque = frame->reordered_opaque; | ||
| 518 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 519 | #endif | ||
| 520 | opaque->duration = frame->duration; | 512 | opaque->duration = frame->duration; |
| 521 | opaque->wallclock = wallclock; | 513 | opaque->wallclock = wallclock; |
| 522 | if (ctx->export_side_data & AV_CODEC_EXPORT_DATA_PRFT) | 514 | if (ctx->export_side_data & AV_CODEC_EXPORT_DATA_PRFT) |
| @@ -681,11 +673,6 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, · 158 unmodified lines | |||
| 681 | out_opaque = pic_out.opaque; | 673 | out_opaque = pic_out.opaque; |
| 682 | if (out_opaque >= x4->reordered_opaque && | 674 | if (out_opaque >= x4->reordered_opaque && |
| 683 | out_opaque < &x4->reordered_opaque[x4->nb_reordered_opaque]) { | 675 | out_opaque < &x4->reordered_opaque[x4->nb_reordered_opaque]) { |
| 684 | #if FF_API_REORDERED_OPAQUE | ||
| 685 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 686 | ctx->reordered_opaque = out_opaque->reordered_opaque; | ||
| 687 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 688 | #endif | ||
| 689 | wallclock = out_opaque->wallclock; | 676 | wallclock = out_opaque->wallclock; |
| 690 | pkt->duration = out_opaque->duration; | 677 | pkt->duration = out_opaque->duration; |
| 691 | 678 | ||
| @@ -700,11 +687,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 8 unmodified lines | |||
| 700 | // Unexpected opaque pointer on picture output | 687 | // Unexpected opaque pointer on picture output |
| 701 | av_log(ctx, AV_LOG_ERROR, "Unexpected opaque pointer; " | 688 | av_log(ctx, AV_LOG_ERROR, "Unexpected opaque pointer; " |
| 702 | "this is a bug, please report it.\n"); | 689 | "this is a bug, please report it.\n"); |
| 703 | #if FF_API_REORDERED_OPAQUE | ||
| 704 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 705 | ctx->reordered_opaque = 0; | ||
| 706 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 707 | #endif | ||
| 708 | } | 690 | } |
| 709 | 691 | ||
| 710 | switch (pic_out.i_type) { | 692 | switch (pic_out.i_type) { |
| @@ -42,9 +42,6 @@ · 41 unmodified lines | |||
| 42 | #include "sei.h" | 42 | #include "sei.h" |
| 43 | 43 | ||
| 44 | typedef struct ReorderedData { | 44 | typedef struct ReorderedData { |
| 45 | #if FF_API_REORDERED_OPAQUE | ||
| 46 | int64_t reordered_opaque; | ||
| 47 | #endif | ||
| 48 | int64_t duration; | 45 | int64_t duration; |
| 49 | 46 | ||
| 50 | void *frame_opaque; | 47 | void *frame_opaque; |
| @@ -626,11 +623,6 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 575 unmodified lines | |||
| 626 | rd = &ctx->rd[rd_idx]; | 623 | rd = &ctx->rd[rd_idx]; |
| 627 | 624 | ||
| 628 | rd->duration = pic->duration; | 625 | rd->duration = pic->duration; |
| 629 | #if FF_API_REORDERED_OPAQUE | ||
| 630 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 631 | rd->reordered_opaque = pic->reordered_opaque; | ||
| 632 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 633 | #endif | ||
| 634 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 626 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 635 | rd->frame_opaque = pic->opaque; | 627 | rd->frame_opaque = pic->opaque; |
| 636 | ret = av_buffer_replace(&rd->frame_opaque_ref, pic->opaque_ref); | 628 | ret = av_buffer_replace(&rd->frame_opaque_ref, pic->opaque_ref); |
| @@ -768,11 +760,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 131 unmodified lines | |||
| 768 | int idx = (int)(intptr_t)x265pic_out.userData - 1; | 760 | int idx = (int)(intptr_t)x265pic_out.userData - 1; |
| 769 | ReorderedData *rd = &ctx->rd[idx]; | 761 | ReorderedData *rd = &ctx->rd[idx]; |
| 770 | 762 | ||
| 771 | #if FF_API_REORDERED_OPAQUE | ||
| 772 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 773 | avctx->reordered_opaque = rd->reordered_opaque; | ||
| 774 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 775 | #endif | ||
| 776 | pkt->duration = rd->duration; | 763 | pkt->duration = rd->duration; |
| 777 | 764 | ||
| 778 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 765 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| @@ -783,13 +770,6 @@ FF_ENABLE_DEPRECATION_WARNINGS · 4 unmodified lines | |||
| 783 | 770 | ||
| 784 | rd_release(ctx, idx); | 771 | rd_release(ctx, idx); |
| 785 | } | 772 | } |
| 786 | #if FF_API_REORDERED_OPAQUE | ||
| 787 | else { | ||
| 788 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 789 | avctx->reordered_opaque = 0; | ||
| 790 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 791 | } | ||
| 792 | #endif | ||
| 793 | 773 | ||
| 794 | *got_packet = 1; | 774 | *got_packet = 1; |
| 795 | return 0; | 775 | return 0; |
| @@ -2282,12 +2282,6 @@ static int nvenc_store_frame_data(AVCodecContext *avctx, NV_ENC_PIC_PARAMS *pic_ · 2281 unmodified lines | |||
| 2282 | frame_data->duration = frame->duration; | 2282 | frame_data->duration = frame->duration; |
| 2283 | frame_data->frame_opaque = frame->opaque; | 2283 | frame_data->frame_opaque = frame->opaque; |
| 2284 | 2284 | ||
| 2285 | #if FF_API_REORDERED_OPAQUE | ||
| 2286 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 2287 | frame_data->reordered_opaque = frame->reordered_opaque; | ||
| 2288 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 2289 | #endif | ||
| 2290 | |||
| 2291 | ctx->frame_data_array_pos = (ctx->frame_data_array_pos + 1) % ctx->frame_data_array_nb; | 2285 | ctx->frame_data_array_pos = (ctx->frame_data_array_pos + 1) % ctx->frame_data_array_nb; |
| 2292 | pic_params->inputDuration = idx; | 2286 | pic_params->inputDuration = idx; |
| 2293 | 2287 | ||
| @@ -2304,12 +2298,6 @@ static int nvenc_retrieve_frame_data(AVCodecContext *avctx, NV_ENC_LOCK_BITSTREA · 10 unmodified lines | |||
| 2304 | 2298 | ||
| 2305 | pkt->duration = frame_data->duration; | 2299 | pkt->duration = frame_data->duration; |
| 2306 | 2300 | ||
| 2307 | #if FF_API_REORDERED_OPAQUE | ||
| 2308 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 2309 | avctx->reordered_opaque = frame_data->reordered_opaque; | ||
| 2310 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 2311 | #endif | ||
| 2312 | |||
| 2313 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { | 2301 | if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { |
| 2314 | pkt->opaque = frame_data->frame_opaque; | 2302 | pkt->opaque = frame_data->frame_opaque; |
| 2315 | pkt->opaque_ref = frame_data->frame_opaque_ref; | 2303 | pkt->opaque_ref = frame_data->frame_opaque_ref; |
| @@ -100,10 +100,6 @@ typedef struct NvencFrameData · 99 unmodified lines | |||
| 100 | { | 100 | { |
| 101 | int64_t duration; | 101 | int64_t duration; |
| 102 | 102 | ||
| 103 | #if FF_API_REORDERED_OPAQUE | ||
| 104 | int64_t reordered_opaque; | ||
| 105 | #endif | ||
| 106 | |||
| 107 | void *frame_opaque; | 103 | void *frame_opaque; |
| 108 | AVBufferRef *frame_opaque_ref; | 104 | AVBufferRef *frame_opaque_ref; |
| 109 | } NvencFrameData; | 105 | } NvencFrameData; |
| @@ -125,11 +125,6 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) · 124 unmodified lines | |||
| 125 | s->sw_pix_fmt = AV_PIX_FMT_NONE; | 125 | s->sw_pix_fmt = AV_PIX_FMT_NONE; |
| 126 | s->sample_fmt = AV_SAMPLE_FMT_NONE; | 126 | s->sample_fmt = AV_SAMPLE_FMT_NONE; |
| 127 | 127 | ||
| 128 | #if FF_API_REORDERED_OPAQUE | ||
| 129 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 130 | s->reordered_opaque = AV_NOPTS_VALUE; | ||
| 131 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 132 | #endif | ||
| 133 | if(codec && codec2->priv_data_size){ | 128 | if(codec && codec2->priv_data_size){ |
| 134 | s->priv_data = av_mallocz(codec2->priv_data_size); | 129 | s->priv_data = av_mallocz(codec2->priv_data_size); |
| 135 | if (!s->priv_data) | 130 | if (!s->priv_data) |
| @@ -412,11 +412,6 @@ static int update_context_from_user(AVCodecContext *dst, const AVCodecContext *s · 411 unmodified lines | |||
| 412 | dst->skip_frame = src->skip_frame; | 412 | dst->skip_frame = src->skip_frame; |
| 413 | 413 | ||
| 414 | dst->frame_num = src->frame_num; | 414 | dst->frame_num = src->frame_num; |
| 415 | #if FF_API_REORDERED_OPAQUE | ||
| 416 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 417 | dst->reordered_opaque = src->reordered_opaque; | ||
| 418 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 419 | #endif | ||
| 420 | 415 | ||
| 421 | av_packet_unref(dst->internal->last_pkt_props); | 416 | av_packet_unref(dst->internal->last_pkt_props); |
| 422 | err = av_packet_copy_props(dst->internal->last_pkt_props, src->internal->last_pkt_props); | 417 | err = av_packet_copy_props(dst->internal->last_pkt_props, src->internal->last_pkt_props); |