summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Sabbi <nicola.sabbi@poste.it>2006-08-27 12:21:19 +0000
committerNico Sabbi <nicola.sabbi@poste.it>2006-08-27 12:21:19 +0000
commit9e6c94707e9b1cbbf7c8c63b6235fe0d7739e07f (patch)
treee3f4eafa4479549264b9140eedd155e4842897db
parent4eb72c6b2354e7e4126bb958832bf3dd24c8e7e9 (diff)
added option probesize; at the moment only used by mpegts.c
Originally committed as revision 6109 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/utils.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 9ba1b27865..934d92b73a 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -341,6 +341,8 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_GENPTS 0x0001 ///< generate pts if missing even if it requires parsing future frames
int loop_input;
+ /* decoding: size of data to probe; encoding unused */
+ unsigned int probesize;
} AVFormatContext;
typedef struct AVPacketList {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a590de024c..862cf8b707 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -461,6 +461,7 @@ static const char* format_to_name(void* ptr)
#define D AV_OPT_FLAG_DECODING_PARAM
static const AVOption options[]={
+{"probesize", NULL, OFFSET(probesize), FF_OPT_TYPE_INT, DEFAULT, 32, INT_MAX, D},
{NULL},
};
@@ -468,6 +469,9 @@ static const AVClass av_format_context_class = { "AVFormatContext", format_to_na
void avformat_get_context_defaults(AVFormatContext *s){
memset(s, 0, sizeof(AVFormatContext));
+
+ /* from mpegts.c: 1.0 second at 24Mbit/s */
+ s->probesize=32000;
}
AVFormatContext *av_alloc_format_context(void)