History

Make avfilter_graph_free() do nothing if graph is NULL.

Originally committed as revision 26323 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 15 years ago

Commit caeb0c31 parent b382d1e3 files · +4 −2Browse files

Unified · Split

3 files
  1. libavfilter/avfilter.h +1 −1
  2. libavfilter/avfiltergraph.c +2 −0
  3. libavfilter/avfiltergraph.h +1 −1
libavfilter/avfilter.h+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828
2929 #define LIBAVFILTER_VERSION_MAJOR 1
3030 #define LIBAVFILTER_VERSION_MINOR 73
31−#define LIBAVFILTER_VERSION_MICRO 0
31+#define LIBAVFILTER_VERSION_MICRO 1
3232
3333 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
3434 LIBAVFILTER_VERSION_MINOR, \
libavfilter/avfiltergraph.c+2−0
@@ -34,6 +34,8 @@ AVFilterGraph *avfilter_graph_alloc(void) · 33 unmodified lines
3434
3535 void avfilter_graph_free(AVFilterGraph *graph)
3636 {
37+ if (!graph)
38+ return;
3739 for (; graph->filter_count > 0; graph->filter_count --)
3840 avfilter_free(graph->filters[graph->filter_count - 1]);
3941 av_freep(&graph->scale_sws_opts);
libavfilter/avfiltergraph.h+1−1
@@ -79,7 +79,7 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, · 78 unmodified lines
7979 int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);
8080
8181 /**
82− * Free a graph and destroy its links.
82+ * Free a graph and destroy its links, graph may be NULL.
8383 */
8484 void avfilter_graph_free(AVFilterGraph *graph);
8585

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