summaryrefslogtreecommitdiff
path: root/libavcodec/nellymoserdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-06-21 05:17:08 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-06-22 12:19:24 +0200
commit55c7bb0665c4e2d2f39025fb04428f5c5764dc8c (patch)
treea1b31f2635e9fb45c26a029e96a4e459e3a1bce8 /libavcodec/nellymoserdec.c
parent82352f3c1aaa1956e9a5cf22fdfde80dd1142130 (diff)
avcodec/nellymoserdec: Don't use invalid AVPacketSideDataType
Commits 957a593cd95b15a5dcb2f50306fbac59f09d8e9e and 11828b8885cc1d87ffc7b1b4bbe642ce9720b194 made the flv demuxer export a certain flag as side data to be used by the nellymoser decoder for mid-stream sample rate changes. It used a custom side data type 'F' that was never officially documented. Yet since 2215c39e94e01f57b3191a29e0e51d7e230daf49 (merged in commit 52c522c72090233edeeb0486a9bd8bee925a710a) this information is exported via the properly documented AV_PKT_DATA_PARAM_CHANGE side data. The merge commit therefore stopped exporting the 'F' sidedata; yet the changes in the Nellymoser decoder (which are now dead code (and would become dangerous if lots of new side data types were added)) have not been removed. This commit does this. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/nellymoserdec.c')
-rw-r--r--libavcodec/nellymoserdec.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index b0deb79cf5..d667d9ce79 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -143,7 +143,6 @@ static int decode_tag(AVCodecContext *avctx, void *data,
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
- const uint8_t *side=av_packet_get_side_data(avpkt, 'F', NULL);
int buf_size = avpkt->size;
NellyMoserDecodeContext *s = avctx->priv_data;
int blocks, i, ret;
@@ -160,15 +159,6 @@ static int decode_tag(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_WARNING, "Leftover bytes: %d.\n",
buf_size % NELLY_BLOCK_LEN);
}
- /* Normal numbers of blocks for sample rates:
- * 8000 Hz - 1
- * 11025 Hz - 2
- * 16000 Hz - 3
- * 22050 Hz - 4
- * 44100 Hz - 8
- */
- if(side && blocks>1 && avctx->sample_rate%11025==0 && (1<<((side[0]>>2)&3)) == blocks)
- avctx->sample_rate= 11025*(blocks/2);
/* get output buffer */
frame->nb_samples = NELLY_SAMPLES * blocks;