mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix out of sync with ffmpeg >= 2.2.
This workaround for some special ffmpeg versions, conflicts with latest ffmpeg.
This commit is contained in:
parent
0cdedb88ac
commit
ac7672053a
4
codec.c
4
codec.c
@ -222,12 +222,14 @@ static int Codec_get_buffer(AVCodecContext * video_ctx, AVFrame * frame)
|
|||||||
frame->data[2] = NULL;
|
frame->data[2] = NULL;
|
||||||
frame->data[3] = NULL;
|
frame->data[3] = NULL;
|
||||||
|
|
||||||
|
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(52,66,100)
|
||||||
// reordered frames
|
// reordered frames
|
||||||
if (video_ctx->pkt) {
|
if (video_ctx->pkt) {
|
||||||
frame->pkt_pts = video_ctx->pkt->pts;
|
frame->pkt_pts = video_ctx->pkt->pts;
|
||||||
} else {
|
} else {
|
||||||
frame->pkt_pts = AV_NOPTS_VALUE;
|
frame->pkt_pts = AV_NOPTS_VALUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -249,12 +251,14 @@ static int Codec_get_buffer(AVCodecContext * video_ctx, AVFrame * frame)
|
|||||||
frame->data[0] = (void *)(size_t) surface;
|
frame->data[0] = (void *)(size_t) surface;
|
||||||
frame->data[3] = (void *)(size_t) surface;
|
frame->data[3] = (void *)(size_t) surface;
|
||||||
|
|
||||||
|
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(52,66,100)
|
||||||
// reordered frames
|
// reordered frames
|
||||||
if (video_ctx->pkt) {
|
if (video_ctx->pkt) {
|
||||||
frame->pkt_pts = video_ctx->pkt->pts;
|
frame->pkt_pts = video_ctx->pkt->pts;
|
||||||
} else {
|
} else {
|
||||||
frame->pkt_pts = AV_NOPTS_VALUE;
|
frame->pkt_pts = AV_NOPTS_VALUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//Debug(3, "codec: fallback to default get_buffer\n");
|
//Debug(3, "codec: fallback to default get_buffer\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user