aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-23 14:39:50 +0200
committerAnton Khirnov <anton@khirnov.net>2022-09-05 08:13:09 +0200
commit6def44128afedcfbcad98ca00e209345875fac45 (patch)
treede5b0ef53085b169903d7e17fb3e1b9951e17e26
parent000b8d2acc53b23eaccf7a2d3e650f7e633bd3b6 (diff)
downloadffmpeg-6def44128afedcfbcad98ca00e209345875fac45.tar.gz
lavf/dv: set audio bitrate only at stream creation
Demuxers are not supposed to update AVCodecParameters after the stream was seen by the caller. This value is not important enough to support dynamic updates for.
-rw-r--r--libavformat/dv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index f65c2d596f..9c8b0a262c 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -280,6 +280,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame)
c->ast[i]->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;
c->ast[i]->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
c->ast[i]->start_time = 0;
+ c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16;
c->audio_pkt[i].size = 0;
c->audio_pkt[i].data = c->audio_buf[i];
@@ -290,7 +291,6 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame)
c->audio_pkt[i].pos = -1;
}
c->ast[i]->codecpar->sample_rate = dv_audio_frequency[freq];
- c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16;
}
c->ach = ach;