"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/smacker.c" between
libav-12.1.tar.gz and libav-12.2.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

smacker.c  (libav-12.1):smacker.c  (libav-12.2)
skipping to change at line 626 skipping to change at line 626
stereo = get_bits1(&gb); stereo = get_bits1(&gb);
bits = get_bits1(&gb); bits = get_bits1(&gb);
if (stereo ^ (avctx->channels != 1)) { if (stereo ^ (avctx->channels != 1)) {
av_log(avctx, AV_LOG_ERROR, "channels mismatch\n"); av_log(avctx, AV_LOG_ERROR, "channels mismatch\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (bits && avctx->sample_fmt == AV_SAMPLE_FMT_U8) { if (bits && avctx->sample_fmt == AV_SAMPLE_FMT_U8) {
av_log(avctx, AV_LOG_ERROR, "sample format mismatch\n"); av_log(avctx, AV_LOG_ERROR, "sample format mismatch\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (unp_size % (avctx->channels * (bits + 1))) {
av_log(avctx, AV_LOG_ERROR,
"The buffer does not contain an integer number of samples\n");
return AVERROR(EINVAL);
}
/* get output buffer */ /* get output buffer */
frame->nb_samples = unp_size / (avctx->channels * (bits + 1)); frame->nb_samples = unp_size / (avctx->channels * (bits + 1));
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) { if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret; return ret;
} }
samples = (int16_t *)frame->data[0]; samples = (int16_t *)frame->data[0];
samples8 = frame->data[0]; samples8 = frame->data[0];
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)