aboutsummaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun2015-08-08 10:41:30 +0200
committerAndreas Cadhalpun2015-08-22 19:16:13 +0200
commitc363843a53553cbda6d42d98e8fbd165eda193fb (patch)
treefff739d65082077b7cd9b2de9ae6d3ca7e018f44 /ffmpeg.c
parent5f1c37aefbdcefa1a68ba3ea8bbc7e70aa672960 (diff)
add missing FF_API_DESTRUCT_PACKET guards
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index b84fb1534c..ae02b00784 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -693,7 +693,13 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
&new_pkt.data, &new_pkt.size,
pkt->data, pkt->size,
pkt->flags & AV_PKT_FLAG_KEY);
- if(a == 0 && new_pkt.data != pkt->data && new_pkt.destruct) {
+FF_DISABLE_DEPRECATION_WARNINGS
+ if(a == 0 && new_pkt.data != pkt->data
+#if FF_API_DESTRUCT_PACKET
+ && new_pkt.destruct
+#endif
+ ) {
+FF_ENABLE_DEPRECATION_WARNINGS
uint8_t *t = av_malloc(new_pkt.size + AV_INPUT_BUFFER_PADDING_SIZE); //the new should be a subset of the old so cannot overflow
if(t) {
memcpy(t, new_pkt.data, new_pkt.size);