[FFmpeg-cvslog] Add a flag to disable side data merging.
Michael Niedermayer
git at videolan.org
Sat May 21 02:33:55 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 21 02:17:10 2011 +0200| [5c08c7b2151409c3b7a05e54fe46834deedff119] | committer: Michael Niedermayer
Add a flag to disable side data merging.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c08c7b2151409c3b7a05e54fe46834deedff119
---
libavformat/avformat.h | 2 +-
libavformat/options.c | 1 +
libavformat/utils.c | 3 ++-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 2574bbc..991b0a4 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 82be848..5e0e3a4 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 8d9f979..c5e5700 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){
More information about the ffmpeg-cvslog
mailing list