[FFmpeg-cvslog] avformat: fix atomatic format selection for (s)segment
Michael Niedermayer
git at videolan.org
Tue Apr 2 22:13:54 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 2 21:48:25 2013 +0200| [ccc25378bd1bb42b89deaef49febb06ce0e1a44b] | committer: Michael Niedermayer
avformat: fix atomatic format selection for (s)segment
Fixes Ticket2236
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccc25378bd1bb42b89deaef49febb06ce0e1a44b
---
libavformat/utils.c | 4 ++++
1 file changed, 4 insertions(+)
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;
More information about the ffmpeg-cvslog
mailing list