mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Merge commit '11de006babf735aafa3462d43dd2c02bb6ac6e2f'
* commit '11de006babf735aafa3462d43dd2c02bb6ac6e2f': Combine deprecation guards where appropriate Merged-by: Clément Bœsch <clement@stupeflix.com>
This commit is contained in:
commit
a444a50510
@ -971,7 +971,7 @@ fail:
|
|||||||
|
|
||||||
static int v4l2_read_packet(AVFormatContext *ctx, AVPacket *pkt)
|
static int v4l2_read_packet(AVFormatContext *ctx, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
#if FF_API_CODED_FRAME
|
#if FF_API_CODED_FRAME && FF_API_LAVF_AVCTX
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
struct video_data *s = ctx->priv_data;
|
struct video_data *s = ctx->priv_data;
|
||||||
AVFrame *frame = ctx->streams[0]->codec->coded_frame;
|
AVFrame *frame = ctx->streams[0]->codec->coded_frame;
|
||||||
@ -984,7 +984,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_CODED_FRAME
|
#if FF_API_CODED_FRAME && FF_API_LAVF_AVCTX
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
if (frame && s->interlaced) {
|
if (frame && s->interlaced) {
|
||||||
frame->interlaced_frame = 1;
|
frame->interlaced_frame = 1;
|
||||||
|
@ -284,7 +284,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
st = s->streams[i];
|
st = s->streams[i];
|
||||||
par = st->codecpar;
|
par = st->codecpar;
|
||||||
|
|
||||||
#if FF_API_LAVF_CODEC_TB
|
#if FF_API_LAVF_CODEC_TB && FF_API_LAVF_AVCTX
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
if (!st->time_base.num && st->codec->time_base.num) {
|
if (!st->time_base.num && st->codec->time_base.num) {
|
||||||
av_log(s, AV_LOG_WARNING, "Using AVStream.codec.time_base as a "
|
av_log(s, AV_LOG_WARNING, "Using AVStream.codec.time_base as a "
|
||||||
@ -530,7 +530,7 @@ fail:
|
|||||||
#define UNCODED_FRAME_PACKET_SIZE (INT_MIN / 3 * 2 + (int)sizeof(AVFrame))
|
#define UNCODED_FRAME_PACKET_SIZE (INT_MIN / 3 * 2 + (int)sizeof(AVFrame))
|
||||||
|
|
||||||
|
|
||||||
#if FF_API_COMPUTE_PKT_FIELDS2
|
#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
//FIXME merge with compute_pkt_fields
|
//FIXME merge with compute_pkt_fields
|
||||||
static int compute_muxer_pkt_fields(AVFormatContext *s, AVStream *st, AVPacket *pkt)
|
static int compute_muxer_pkt_fields(AVFormatContext *s, AVStream *st, AVPacket *pkt)
|
||||||
@ -769,7 +769,7 @@ static int prepare_input_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
#if !FF_API_COMPUTE_PKT_FIELDS2
|
#if !FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX
|
||||||
/* sanitize the timestamps */
|
/* sanitize the timestamps */
|
||||||
if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) {
|
if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) {
|
||||||
AVStream *st = s->streams[pkt->stream_index];
|
AVStream *st = s->streams[pkt->stream_index];
|
||||||
@ -838,7 +838,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_COMPUTE_PKT_FIELDS2
|
#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX
|
||||||
ret = compute_muxer_pkt_fields(s, s->streams[pkt->stream_index], pkt);
|
ret = compute_muxer_pkt_fields(s, s->streams[pkt->stream_index], pkt);
|
||||||
|
|
||||||
if (ret < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
|
if (ret < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
|
||||||
@ -1092,7 +1092,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
|
|||||||
av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
|
av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
|
||||||
pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
|
pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
|
||||||
|
|
||||||
#if FF_API_COMPUTE_PKT_FIELDS2
|
#if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX
|
||||||
if ((ret = compute_muxer_pkt_fields(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
|
if ((ret = compute_muxer_pkt_fields(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
|
||||||
goto fail;
|
goto fail;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user