diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2007-03-07 01:52:08 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2007-03-07 01:52:08 +0000 |
commit | 031311cbd1c74104db93388beb8af5547de45279 (patch) | |
tree | a49ca2eaaca3093e7c76f00fe02852b0655c7bb0 /libavformat/flvdec.c | |
parent | 9ff85412ad4fd7a4f338f938f6b72e889f7d87f3 (diff) | |
download | ffmpeg-031311cbd1c74104db93388beb8af5547de45279.tar.gz |
workaround for broken flvtoolized files
Originally committed as revision 8277 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 6295f1a567..bf91fbbc78 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -230,6 +230,12 @@ static int flv_read_header(AVFormatContext *s, url_fskip(&s->pb, 4); flags = get_byte(&s->pb); + /* old flvtool cleared this field */ + /* FIXME: better fix needed */ + if (!flags) { + flags = FLV_HEADER_FLAG_HASVIDEO | FLV_HEADER_FLAG_HASAUDIO; + av_log(s, AV_LOG_WARNING, "Broken FLV file, which says no streams present, this might fail\n"); + } if(flags & FLV_HEADER_FLAG_HASVIDEO){ st = av_new_stream(s, 0); |