[MPlayer-dev-eng] [PATCH] Set i_bps for ASF files
Reimar Doeffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue May 15 11:34:16 CEST 2007
Hello,
On Tue, May 08, 2007 at 09:24:35AM +0800, Zuxy Meng wrote:
> 2007/5/7, Zuxy Meng <zuxy.meng at gmail.com>:
> >2007/3/4, Zuxy Meng <zuxy.meng at gmail.com>:
> >> The patch sets i_bps for asf files, according either to their extended
> >> stream property or (if the former isn't available) the stream bitrate
> >> object. Extended stream property gives bitrate for raw data (without
> >> overhead) i.e. data that is actually sent out to network when streamed
> >> and is the same as what WMP reports as bitrate.
> >
> >Attached is the patch against current SVN. A similar patch has been
> >committed for ffmpeg.
> >
> >Comments?
>
> Oops, the SVN has just changed a little bit so patch updated.
Looks mostly okay, but I don't really maintain asf.
> +static unsigned get_bitrate(char *buf, int buf_len, int this_stream_num)
If you have some extra time, could you check if the mms streaming code
maybe can reuse this? It also checks the bitrate...
> @@ -556,6 +586,9 @@
> sh_video->aspect = asp_ratio * sh_video->bih->biWidth /
> sh_video->bih->biHeight;
> }
> + if (asf->bps == 0)
> + asf->bps = get_bitrate(hdr, hdr_len, streamh->stream_no);
> + sh_video->i_bps = asf->bps;
indentation does not match the surrounding code. Also, should
sh_video->i_bps also be set if asf->bps happens to still be 0?
Greetings,
Reimar Doeffinger
More information about the MPlayer-dev-eng
mailing list