History

vsrc_buffer: propagate error code in av_vsrc_buffer_add_frame()

Propagate av_vsrc_buffer_add_video_buffer_ref() error code rather than return 0.

Stefano Sabatini committed 15 years ago

Commit 9e66b641 parent 665e6081 file · +3 −2Browse files

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

Unified · Split

libavfilter/vsrc_buffer.c+3−2
@@ -111,15 +111,16 @@ int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_filter, AVFilter · 110 unmodified lines
111111
112112 int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)
113113 {
114+ int ret;
114115 AVFilterBufferRef *picref =
115116 avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
116117 if (!picref)
117118 return AVERROR(ENOMEM);
118− av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref);
119+ ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref);
119120 picref->buf->data[0] = NULL;
120121 avfilter_unref_buffer(picref);
121122
122− return 0;
123+ return ret;
123124 }
124125 #endif
125126

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