aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-21 02:17:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-21 02:31:27 +0200
commit5c08c7b2151409c3b7a05e54fe46834deedff119 (patch)
tree521e6530dc916911350aa77b350464fdade32da9 /libavformat
parent94eadee7efc2c5d19ecfe92d36f0556663468080 (diff)
downloadffmpeg-5c08c7b2151409c3b7a05e54fe46834deedff119.tar.gz
Add a flag to disable side data merging.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/options.c1
-rw-r--r--libavformat/utils.c3
3 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 2574bbc424..991b0a4fd5 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -731,7 +731,7 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_MP4A_LATM 0x0080 ///< Enable RTP MP4A-LATM payload
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
-
+#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Dont merge side data but keep it seperate.
int loop_input;
/**
diff --git a/libavformat/options.c b/libavformat/options.c
index 82be8487eb..5e0e3a428d 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -51,6 +51,7 @@ static const AVOption options[]={
{"igndts", "ignore dts", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"},
{"rtphint", "add rtp hinting", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_RTP_HINT }, INT_MIN, INT_MAX, E, "fflags"},
{"sortdts", "try to interleave outputted packets by dts", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"},
+{"keepside", "dont merge side data", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"},
{"latm", "enable RTP MP4A-LATM payload", 0, FF_OPT_TYPE_CONST, {.dbl = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"},
{"analyzeduration", "how many microseconds are analyzed to estimate duration", OFFSET(max_analyze_duration), FF_OPT_TYPE_INT, {.dbl = 5*AV_TIME_BASE }, 0, INT_MAX, D},
{"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D},
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8d9f9799cc..c5e570028e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -673,7 +673,8 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
continue;
}
- av_packet_merge_side_data(pkt);
+ if(!(s->flags & AVFMT_FLAG_KEEP_SIDE_DATA))
+ av_packet_merge_side_data(pkt);
st= s->streams[pkt->stream_index];
switch(st->codec->codec_type){