Mercurial > mplayer.hg
changeset 36372:c95bdc49af2e
ad_ffmpeg: fix commit fixing sample rate changes to actually work.
author | reimar |
---|---|
date | Wed, 16 Oct 2013 17:20:31 +0000 |
parents | bbf289ad03f2 |
children | 3cdf45841125 |
files | libmpcodecs/ad_ffmpeg.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c Tue Oct 15 18:58:55 2013 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Wed Oct 16 17:20:31 2013 +0000 @@ -68,6 +68,7 @@ if(sh_audio->wf){ struct adctx *c = lavc_context->opaque; c->srate_changed |= c->last_samplerate && c->last_samplerate != samplerate; + c->last_samplerate = samplerate; // If the decoder uses the wrong number of channels all is lost anyway. // sh_audio->channels=sh_audio->wf->nChannels; @@ -112,7 +113,7 @@ lavc_context = avcodec_alloc_context3(lavc_codec); sh_audio->context=lavc_context; - lavc_context->opaque = calloc(sizeof(struct adctx), 1); + lavc_context->opaque = av_mallocz(sizeof(struct adctx)); snprintf(tmpstr, sizeof(tmpstr), "%f", drc_level); av_dict_set(&opts, "drc_scale", tmpstr, 0);