summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-02 21:48:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-02 21:52:40 +0200
commitccc25378bd1bb42b89deaef49febb06ce0e1a44b (patch)
tree66e639590776fbb6eda6ad41c0d81d38f73b893a /libavformat
parent356363c89830585b0a1476ccc16d79158260617c (diff)
downloadffmpeg-streaming-ccc25378bd1bb42b89deaef49febb06ce0e1a44b.zip
ffmpeg-streaming-ccc25378bd1bb42b89deaef49febb06ce0e1a44b.tar.gz
avformat: fix atomatic format selection for (s)segment
Fixes Ticket2236 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0a12d8a..001b0e3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -222,6 +222,10 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
const char *filename, const char *mime_type, enum AVMediaType type){
+ if (!strcmp(fmt->name, "segment") || !strcmp(fmt->name, "ssegment")) {
+ fmt = av_guess_format(NULL, filename, NULL);
+ }
+
if(type == AVMEDIA_TYPE_VIDEO){
enum AVCodecID codec_id= AV_CODEC_ID_NONE;
OpenPOWER on IntegriCloud