summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-14 14:46:40 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-14 14:52:43 +0200
commita34dfc93efe380dd9c2b147e227caa14b063d32f (patch)
tree8542b729c5a86c7aa4e4f114908a36a80e92faaa /ffmpeg.c
parent435dfc15dfa91681c0e3dc8bd42f92af6bec2c8f (diff)
ffmpeg: add deprecation guards around remaining AVFMT_RAWPICTURE usage
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index e121d55eb7..36a68fbd4c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1099,6 +1099,7 @@ static void do_video_out(AVFormatContext *s,
#endif
return;
+#if FF_API_LAVF_FMT_RAWPICTURE
if (s->oformat->flags & AVFMT_RAWPICTURE &&
enc->codec->id == AV_CODEC_ID_RAWVIDEO) {
/* raw pictures are written as AVPicture structure to
@@ -1114,7 +1115,9 @@ static void do_video_out(AVFormatContext *s,
pkt.flags |= AV_PKT_FLAG_KEY;
write_frame(s, &pkt, ost);
- } else {
+ } else
+#endif
+ {
int got_packet, forced_keyframe = 0;
double pts_time;
@@ -1704,8 +1707,10 @@ static void flush_encoders(void)
if (enc->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
continue;
+#if FF_API_LAVF_FMT_RAWPICTURE
if (enc->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == AV_CODEC_ID_RAWVIDEO)
continue;
+#endif
for (;;) {
int (*encode)(AVCodecContext*, AVPacket*, const AVFrame*, int*) = NULL;
@@ -1880,6 +1885,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
}
av_copy_packet_side_data(&opkt, pkt);
+#if FF_API_LAVF_FMT_RAWPICTURE
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
ost->st->codec->codec_id == AV_CODEC_ID_RAWVIDEO &&
(of->ctx->oformat->flags & AVFMT_RAWPICTURE)) {
@@ -1894,6 +1900,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
opkt.size = sizeof(AVPicture);
opkt.flags |= AV_PKT_FLAG_KEY;
}
+#endif
write_frame(of->ctx, &opkt, ost);
}