[FFmpeg-cvslog] Never write 0 as maximum bitrate for asf files.

Carl Eugen Hoyos git at videolan.org
Fri Apr 25 02:12:50 CEST 2014


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Apr 24 17:47:49 2014 +0200| [eeee59ba4d481ba71decae227e34f8d47df0d062] | committer: Carl Eugen Hoyos

Never write 0 as maximum bitrate for asf files.

WMP refuses to play such streams.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eeee59ba4d481ba71decae227e34f8d47df0d062
---

 libavformat/asfenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 6ed4c0b..8add6e0 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -408,7 +408,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
     avio_wl32(pb, (asf->is_streamed || !pb->seekable) ? 3 : 2);  /* ??? */
     avio_wl32(pb, s->packet_size); /* packet size */
     avio_wl32(pb, s->packet_size); /* packet size */
-    avio_wl32(pb, bit_rate); /* Nominal data rate in bps */
+    avio_wl32(pb, bit_rate ? bit_rate : -1); /* Maximum data rate in bps */
     end_header(pb, hpos);
 
     /* unknown headers */



More information about the ffmpeg-cvslog mailing list