summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-03-27 18:36:51 +0100
committerDiego Biurrun <diego@biurrun.de>2013-08-02 19:19:02 +0200
commit7950e519bb094897f957b9a9531cc60ba46cbc91 (patch)
treeb8bcd2acc2a699c2c219e690d439a3f3eb0a6a44 /libavformat
parent3a7050ffed5ce061b114a11e4de4b77aba8efa0b (diff)
Disable deprecation warnings for cases where a replacement is available
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asfdec.c3
-rw-r--r--libavformat/avidec.c5
-rw-r--r--libavformat/mux.c3
-rw-r--r--libavformat/mxg.c5
-rw-r--r--libavformat/psxstr.c3
-rw-r--r--libavformat/rmdec.c3
-rw-r--r--libavformat/utils.c3
7 files changed, 25 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index a7fdc9e4d2..f3978f08a4 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -25,6 +25,7 @@
#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
@@ -1252,7 +1253,9 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
asf_st->frag_offset = 0;
*pkt = asf_st->pkt;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
asf_st->pkt.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
asf_st->pkt.buf = 0;
asf_st->pkt.size = 0;
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 26deb31ec2..9aa6efe223 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -22,6 +22,7 @@
#include "libavutil/avstring.h"
#include "libavutil/bswap.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
@@ -1165,12 +1166,16 @@ resync:
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
AVBufferRef *avbuf = pkt->buf;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
dstr = pkt->destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
size = avpriv_dv_produce_packet(avi->dv_demux, pkt,
pkt->data, pkt->size);
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dstr;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = avbuf;
pkt->flags |= AV_PKT_FLAG_KEY;
diff --git a/libavformat/mux.c b/libavformat/mux.c
index eb91a5ccd3..5a08dd6c72 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -31,6 +31,7 @@
#include "id3v2.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/parseutils.h"
#include "libavutil/time.h"
@@ -452,7 +453,9 @@ void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
this_pktl = av_mallocz(sizeof(AVPacketList));
this_pktl->pkt = *pkt;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL; // do not free original but only the copy
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
av_dup_packet(&this_pktl->pkt); // duplicate the packet if it uses non-alloced memory
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index ea54fe2277..1d1488c059 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/mjpeg.h"
#include "avformat.h"
@@ -169,7 +170,9 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->pts = pkt->dts = mxg->dts;
pkt->stream_index = 0;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
pkt->size = mxg->buffer_ptr - mxg->soi_ptr;
@@ -210,7 +213,9 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->pts = pkt->dts = AV_RL64(startmarker_ptr + 8);
pkt->stream_index = 1;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
pkt->size = size - 14;
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 712dbc9b92..e662ed788d 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -30,6 +30,7 @@
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
@@ -203,7 +204,9 @@ static int str_read_packet(AVFormatContext *s,
pkt->size= -1;
pkt->buf = NULL;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0;
}
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 1750db8bfa..83cf1b0475 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -21,6 +21,7 @@
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
@@ -677,7 +678,9 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
vst->pkt.size= 0;
vst->pkt.buf = NULL;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
vst->pkt.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if(vst->slices != vst->cur_slice) //FIXME find out how to set slices correct from the begin
memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices,
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3a11239e52..89f92eab6a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -26,6 +26,7 @@
#include "libavcodec/bytestream.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "metadata.h"
#include "id3v2.h"
@@ -964,8 +965,10 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
out_pkt.buf = pkt->buf;
pkt->buf = NULL;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
out_pkt.destruct = pkt->destruct;
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
if ((ret = av_dup_packet(&out_pkt)) < 0)