History

src_buffer: merge av_asrc_buffer_add_audio_buffer_ref.

Implement it using av_buffersrc_add_ref.

Nicolas George committed 14 years ago

Commit f8d58c51 parent be8edff1 file · +1 −21Browse files

Showing the changes to libavfilter/src_buffer.c (1 of 1 file). Show all

Unified · Split

libavfilter/src_buffer.c+1−21
@@ -570,27 +570,7 @@ int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *ctx, · 569 unmodified lines
570570 AVFilterBufferRef *samplesref,
571571 int av_unused flags)
572572 {
573− BufferSourceContext *abuffer = ctx->priv;
574− int ret;
575−
576− if (av_fifo_space(abuffer->fifo) < sizeof(samplesref)) {
577− av_log(ctx, AV_LOG_ERROR,
578− "Buffering limit reached. Please consume some available frames "
579− "before adding new ones.\n");
580− return AVERROR(EINVAL);
581− }
582−
583− ret = check_format_change(ctx, samplesref);
584− if (ret < 0)
585− return ret;
586−
587− if (sizeof(samplesref) != av_fifo_generic_write(abuffer->fifo, &samplesref,
588− sizeof(samplesref), NULL)) {
589− av_log(ctx, AV_LOG_ERROR, "Error while writing to FIFO\n");
590− return AVERROR(EINVAL);
591− }
592−
593− return 0;
573+ return av_buffersrc_add_ref(ctx, samplesref, AV_BUFFERSRC_FLAG_NO_COPY);
594574 }
595575
596576 int av_asrc_buffer_add_samples(AVFilterContext *ctx,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t