| OLD | NEW |
| 1 /* | 1 /* |
| 2 * filter graph parser | 2 * filter graph parser |
| 3 * copyright (c) 2008 Vitor Sessak | 3 * copyright (c) 2008 Vitor Sessak |
| 4 * copyright (c) 2007 Bobby Bingham | 4 * copyright (c) 2007 Bobby Bingham |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 snprintf(inst_name, sizeof(inst_name), "Filter %d %s", index, filt_name); | 104 snprintf(inst_name, sizeof(inst_name), "Filter %d %s", index, filt_name); |
| 105 | 105 |
| 106 filt = avfilter_get_by_name(filt_name); | 106 filt = avfilter_get_by_name(filt_name); |
| 107 | 107 |
| 108 if (!filt) { | 108 if (!filt) { |
| 109 av_log(log_ctx, AV_LOG_ERROR, | 109 av_log(log_ctx, AV_LOG_ERROR, |
| 110 "No such filter: '%s'\n", filt_name); | 110 "No such filter: '%s'\n", filt_name); |
| 111 return NULL; | 111 return NULL; |
| 112 } | 112 } |
| 113 | 113 |
| 114 filt_ctx = avfilter_open(filt, inst_name); | 114 avfilter_open(&filt_ctx, filt, inst_name); |
| 115 if (!filt_ctx) { | 115 if (!filt_ctx) { |
| 116 av_log(log_ctx, AV_LOG_ERROR, | 116 av_log(log_ctx, AV_LOG_ERROR, |
| 117 "Error creating filter '%s'\n", filt_name); | 117 "Error creating filter '%s'\n", filt_name); |
| 118 return NULL; | 118 return NULL; |
| 119 } | 119 } |
| 120 | 120 |
| 121 if (avfilter_graph_add_filter(ctx, filt_ctx) < 0) { | 121 if (avfilter_graph_add_filter(ctx, filt_ctx) < 0) { |
| 122 avfilter_destroy(filt_ctx); | 122 avfilter_destroy(filt_ctx); |
| 123 return NULL; | 123 return NULL; |
| 124 } | 124 } |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 return 0; | 374 return 0; |
| 375 | 375 |
| 376 fail: | 376 fail: |
| 377 avfilter_graph_destroy(graph); | 377 avfilter_graph_destroy(graph); |
| 378 free_inout(open_inputs); | 378 free_inout(open_inputs); |
| 379 free_inout(open_outputs); | 379 free_inout(open_outputs); |
| 380 free_inout(curr_inputs); | 380 free_inout(curr_inputs); |
| 381 return -1; | 381 return -1; |
| 382 } | 382 } |
| OLD | NEW |