|
|
|
@ -50,7 +50,9 @@ |
|
|
|
|
#define MB_SIZE 16 |
|
|
|
|
|
|
|
|
|
typedef struct X264Opaque { |
|
|
|
|
#if FF_API_REORDERED_OPAQUE |
|
|
|
|
int64_t reordered_opaque; |
|
|
|
|
#endif |
|
|
|
|
int64_t wallclock; |
|
|
|
|
int64_t duration; |
|
|
|
|
|
|
|
|
@ -459,7 +461,11 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, |
|
|
|
|
goto fail; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if FF_API_REORDERED_OPAQUE |
|
|
|
|
FF_DISABLE_DEPRECATION_WARNINGS |
|
|
|
|
opaque->reordered_opaque = frame->reordered_opaque; |
|
|
|
|
FF_ENABLE_DEPRECATION_WARNINGS |
|
|
|
|
#endif |
|
|
|
|
opaque->duration = frame->duration; |
|
|
|
|
opaque->wallclock = wallclock; |
|
|
|
|
if (ctx->export_side_data & AV_CODEC_EXPORT_DATA_PRFT) |
|
|
|
@ -612,7 +618,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, |
|
|
|
|
out_opaque = pic_out.opaque; |
|
|
|
|
if (out_opaque >= x4->reordered_opaque && |
|
|
|
|
out_opaque < &x4->reordered_opaque[x4->nb_reordered_opaque]) { |
|
|
|
|
#if FF_API_REORDERED_OPAQUE |
|
|
|
|
FF_DISABLE_DEPRECATION_WARNINGS |
|
|
|
|
ctx->reordered_opaque = out_opaque->reordered_opaque; |
|
|
|
|
FF_ENABLE_DEPRECATION_WARNINGS |
|
|
|
|
#endif |
|
|
|
|
wallclock = out_opaque->wallclock; |
|
|
|
|
pkt->duration = out_opaque->duration; |
|
|
|
|
|
|
|
|
@ -627,7 +637,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, |
|
|
|
|
// Unexpected opaque pointer on picture output
|
|
|
|
|
av_log(ctx, AV_LOG_ERROR, "Unexpected opaque pointer; " |
|
|
|
|
"this is a bug, please report it.\n"); |
|
|
|
|
#if FF_API_REORDERED_OPAQUE |
|
|
|
|
FF_DISABLE_DEPRECATION_WARNINGS |
|
|
|
|
ctx->reordered_opaque = 0; |
|
|
|
|
FF_ENABLE_DEPRECATION_WARNINGS |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
switch (pic_out.i_type) { |
|
|
|
|