History

avfilter/vf_fieldmatch: check ff_insert_inpad() for failure

Paul B Mahol committed 9 years ago

Commit dfea94c1 parent 1a58da41 file · +9 −2Browse files

Unified · Split

libavfilter/vf_fieldmatch.c+9−2
@@ -904,17 +904,24 @@ static av_cold int fieldmatch_init(AVFilterContext *ctx) · 903 unmodified lines
904904 .filter_frame = filter_frame,
905905 .config_props = config_input,
906906 };
907+ int ret;
907908
908909 if (!pad.name)
909910 return AVERROR(ENOMEM);
910− ff_insert_inpad(ctx, INPUT_MAIN, &pad);
911+ if ((ret = ff_insert_inpad(ctx, INPUT_MAIN, &pad)) < 0) {
912+ av_freep(&pad.name);
913+ return ret;
914+ }
911915
912916 if (fm->ppsrc) {
913917 pad.name = av_strdup("clean_src");
914918 pad.config_props = NULL;
915919 if (!pad.name)
916920 return AVERROR(ENOMEM);
917− ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad);
921+ if ((ret = ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad)) < 0) {
922+ av_freep(&pad.name);
923+ return ret;
924+ }
918925 }
919926
920927 if ((fm->blockx & (fm->blockx - 1)) ||

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