diff options
author | wm4 <wm4@nowhere> | 2015-04-20 20:52:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-20 20:52:16 +0200 |
commit | c6d046414b1d31046c39da6399130b39fe54813d (patch) | |
tree | 30c1d2b0ac5e13fa9954dae8db0e8d85fb7cc6b4 /demux/demux_lavf.c | |
parent | c5654e400587a8358e486da7da468a775dcd8cc2 (diff) | |
download | mpv-c6d046414b1d31046c39da6399130b39fe54813d.tar.bz2 mpv-c6d046414b1d31046c39da6399130b39fe54813d.tar.xz |
player: change video-bitrate and audio-bitrate properties
Remove the old implementation for these properties. It was never very
good, often returned very innaccurate values or just 0, and was static
even if the source was variable bitrate. Replace it with the
implementation of "packet-video-bitrate". Mark the "packet-..."
properties as deprecated. (The effective difference is different
formatting, and returning the raw value in bits instead of kilobits.)
Also extend the documentation a little.
It appears at least some decoders (sipr?) need the
AVCodecContext.bit_rate field set, so this one is still passed through.
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r-- | demux/demux_lavf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 16cff835f8..c14869555c 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -545,10 +545,6 @@ static void handle_stream(demuxer_t *demuxer, int i) sh_video->aspect = codec->width * codec->sample_aspect_ratio.num / (float)(codec->height * codec->sample_aspect_ratio.den); - sh_video->bitrate = codec->bit_rate; - if (sh_video->bitrate == 0) - sh_video->bitrate = avfc->bit_rate; - uint8_t *sd = av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX, NULL); if (sd) sh_video->rotate = -av_display_rotation_get((uint32_t *)sd); |