[Libav-user] error while writing to abuffer

Yamusani Vinay yamusanivinay at gmail.com
Mon Dec 23 14:26:04 CET 2013


Hi All,

      I used some filters and try to decode the audio and applied the
filters to decoded frame.But for most of the mp3 songs..it is working
perfectly.But for some songs..I am getting error at below mentioned code..

static AVFilterContext *abuffer_ctx = NULL;

snprintf(strbuf, sizeof(strbuf),

  "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64,

  time_base.num, time_base.den, avctx->sample_rate,

  av_get_sample_fmt_name(avctx->sample_fmt),

  avctx->channel_layout);


 err = avfilter_graph_create_filter(&abuffer_ctx, abuffer, NULL,
strbuf,NULL, filter_graph);


 if (err < 0)

 {

 LOGI("error initializing abuffer filter\n");

 return err;

 }

 else

 {

 LOGE("success initializing abuffer filter\n");

 }

int err = av_buffersrc_write_frame(abuffer_ctx, frame);

  av_frame_unref(frame);

av_frame_free(&frame);

  if (err < 0)

  {

      LOGE("error writing frame to buffersrc\n");

  }


By using the above code for some mp3 songs I am getting the log message
"error writing frame to buffersrc\n".So please help me in resolving this
problem.


Thanks & Regards,

bitfield.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131223/818bab21/attachment.html>


More information about the Libav-user mailing list