]> git.sesse.net Git - ffmpeg/blob - libavfilter/src_movie.c
lavfi/movie: force channel layout if not set by the decoder
[ffmpeg] / libavfilter / src_movie.c
1 /*
2  * Copyright (c) 2010 Stefano Sabatini
3  * Copyright (c) 2008 Victor Paesa
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 /**
23  * @file
24  * movie video source
25  *
26  * @todo use direct rendering (no allocation of a new frame)
27  * @todo support a PTS correction mechanism
28  */
29
30 /* #define DEBUG */
31
32 #include <float.h>
33 #include "libavutil/avstring.h"
34 #include "libavutil/avassert.h"
35 #include "libavutil/opt.h"
36 #include "libavutil/imgutils.h"
37 #include "libavutil/timestamp.h"
38 #include "libavformat/avformat.h"
39 #include "audio.h"
40 #include "avcodec.h"
41 #include "avfilter.h"
42 #include "formats.h"
43 #include "internal.h"
44 #include "video.h"
45
46 typedef struct {
47     AVStream *st;
48     int done;
49 } MovieStream;
50
51 typedef struct {
52     /* common A/V fields */
53     const AVClass *class;
54     int64_t seek_point;   ///< seekpoint in microseconds
55     double seek_point_d;
56     char *format_name;
57     char *file_name;
58     char *stream_specs; /**< user-provided list of streams, separated by + */
59     int stream_index; /**< for compatibility */
60     int loop_count;
61
62     AVFormatContext *format_ctx;
63     int eof;
64     AVPacket pkt, pkt0;
65     AVFrame *frame;   ///< video frame to store the decoded images in
66
67     int max_stream_index; /**< max stream # actually used for output */
68     MovieStream *st; /**< array of all streams, one per output */
69     int *out_index; /**< stream number -> output number map, or -1 */
70 } MovieContext;
71
72 #define OFFSET(x) offsetof(MovieContext, x)
73
74 static const AVOption movie_options[]= {
75 {"format_name",  "set format name",         OFFSET(format_name),  AV_OPT_TYPE_STRING, {.str =  0},  CHAR_MIN, CHAR_MAX },
76 {"f",            "set format name",         OFFSET(format_name),  AV_OPT_TYPE_STRING, {.str =  0},  CHAR_MIN, CHAR_MAX },
77 {"streams",      "set streams",             OFFSET(stream_specs), AV_OPT_TYPE_STRING, {.str =  0},  CHAR_MAX, CHAR_MAX },
78 {"s",            "set streams",             OFFSET(stream_specs), AV_OPT_TYPE_STRING, {.str =  0},  CHAR_MAX, CHAR_MAX },
79 {"si",           "set stream index",        OFFSET(stream_index), AV_OPT_TYPE_INT,    {.dbl = -1},  -1,       INT_MAX  },
80 {"stream_index", "set stream index",        OFFSET(stream_index), AV_OPT_TYPE_INT,    {.dbl = -1},  -1,       INT_MAX  },
81 {"seek_point",   "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl =  0},  0,        (INT64_MAX-1) / 1000000 },
82 {"sp",           "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl =  0},  0,        (INT64_MAX-1) / 1000000 },
83 {"loop",         "set loop count",          OFFSET(loop_count),   AV_OPT_TYPE_INT,    {.dbl =  1},  0,        INT_MAX  },
84 {NULL},
85 };
86
87 AVFILTER_DEFINE_CLASS(movie);
88
89 static int movie_config_output_props(AVFilterLink *outlink);
90 static int movie_request_frame(AVFilterLink *outlink);
91
92 static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec)
93 {
94     int i, ret, already = 0, stream_id = -1;
95     char type_char, dummy;
96     AVStream *found = NULL;
97     enum AVMediaType type;
98
99     ret = sscanf(spec, "d%[av]%d%c", &type_char, &stream_id, &dummy);
100     if (ret >= 1 && ret <= 2) {
101         type = type_char == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
102         ret = av_find_best_stream(avf, type, stream_id, -1, NULL, 0);
103         if (ret < 0) {
104             av_log(log, AV_LOG_ERROR, "No %s stream with index '%d' found\n",
105                    av_get_media_type_string(type), stream_id);
106             return NULL;
107         }
108         return avf->streams[ret];
109     }
110     for (i = 0; i < avf->nb_streams; i++) {
111         ret = avformat_match_stream_specifier(avf, avf->streams[i], spec);
112         if (ret < 0) {
113             av_log(log, AV_LOG_ERROR,
114                    "Invalid stream specifier \"%s\"\n", spec);
115             return NULL;
116         }
117         if (!ret)
118             continue;
119         if (avf->streams[i]->discard != AVDISCARD_ALL) {
120             already++;
121             continue;
122         }
123         if (found) {
124             av_log(log, AV_LOG_WARNING,
125                    "Ambiguous stream specifier \"%s\", using #%d\n", spec, i);
126             break;
127         }
128         found = avf->streams[i];
129     }
130     if (!found) {
131         av_log(log, AV_LOG_WARNING, "Stream specifier \"%s\" %s\n", spec,
132                already ? "matched only already used streams" :
133                          "did not match any stream");
134         return NULL;
135     }
136     if (found->codec->codec_type != AVMEDIA_TYPE_VIDEO &&
137         found->codec->codec_type != AVMEDIA_TYPE_AUDIO) {
138         av_log(log, AV_LOG_ERROR, "Stream specifier \"%s\" matched a %s stream,"
139                "currently unsupported by libavfilter\n", spec,
140                av_get_media_type_string(found->codec->codec_type));
141         return NULL;
142     }
143     return found;
144 }
145
146 static int open_stream(void *log, MovieStream *st)
147 {
148     AVCodec *codec;
149     int ret;
150
151     codec = avcodec_find_decoder(st->st->codec->codec_id);
152     if (!codec) {
153         av_log(log, AV_LOG_ERROR, "Failed to find any codec\n");
154         return AVERROR(EINVAL);
155     }
156
157     if ((ret = avcodec_open2(st->st->codec, codec, NULL)) < 0) {
158         av_log(log, AV_LOG_ERROR, "Failed to open codec\n");
159         return ret;
160     }
161
162     return 0;
163 }
164
165 static int guess_channel_layout(MovieStream *st, int st_index, void *log_ctx)
166 {
167     AVCodecContext *dec_ctx = st->st->codec;
168     char buf[256];
169     int64_t chl = av_get_default_channel_layout(dec_ctx->channels);
170
171     if (!chl) {
172         av_log(log_ctx, AV_LOG_ERROR,
173                "Channel layout is not set in stream %d, and could not "
174                "be guessed from the number of channels (%d)\n",
175                st_index, dec_ctx->channels);
176         return AVERROR(EINVAL);
177     }
178
179     av_get_channel_layout_string(buf, sizeof(buf), dec_ctx->channels, chl);
180     av_log(log_ctx, AV_LOG_WARNING,
181            "Channel layout is not set in output stream %d, "
182            "guessed channel layout is '%s'\n",
183            st_index, buf);
184     dec_ctx->channel_layout = chl;
185     return 0;
186 }
187
188 static av_cold int movie_init(AVFilterContext *ctx, const char *args)
189 {
190     MovieContext *movie = ctx->priv;
191     AVInputFormat *iformat = NULL;
192     int64_t timestamp;
193     int nb_streams, ret, i;
194     char default_streams[16], *stream_specs, *spec, *cursor;
195     char name[16];
196     AVStream *st;
197
198     movie->class = &movie_class;
199     av_opt_set_defaults(movie);
200
201     if (args)
202         movie->file_name = av_get_token(&args, ":");
203     if (!movie->file_name || !*movie->file_name) {
204         av_log(ctx, AV_LOG_ERROR, "No filename provided!\n");
205         return AVERROR(EINVAL);
206     }
207
208     if (*args++ == ':' && (ret = av_set_options_string(movie, args, "=", ":")) < 0) {
209         av_log(ctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args);
210         return ret;
211     }
212
213     movie->seek_point = movie->seek_point_d * 1000000 + 0.5;
214
215     stream_specs = movie->stream_specs;
216     if (!stream_specs) {
217         snprintf(default_streams, sizeof(default_streams), "d%c%d",
218                  !strcmp(ctx->filter->name, "amovie") ? 'a' : 'v',
219                  movie->stream_index);
220         stream_specs = default_streams;
221     }
222     for (cursor = stream_specs, nb_streams = 1; *cursor; cursor++)
223         if (*cursor == '+')
224             nb_streams++;
225
226     if (movie->loop_count != 1 && nb_streams != 1) {
227         av_log(ctx, AV_LOG_ERROR,
228                "Loop with several streams is currently unsupported\n");
229         return AVERROR_PATCHWELCOME;
230     }
231
232     av_register_all();
233
234     // Try to find the movie format (container)
235     iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL;
236
237     movie->format_ctx = NULL;
238     if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, NULL)) < 0) {
239         av_log(ctx, AV_LOG_ERROR,
240                "Failed to avformat_open_input '%s'\n", movie->file_name);
241         return ret;
242     }
243     if ((ret = avformat_find_stream_info(movie->format_ctx, NULL)) < 0)
244         av_log(ctx, AV_LOG_WARNING, "Failed to find stream info\n");
245
246     // if seeking requested, we execute it
247     if (movie->seek_point > 0) {
248         timestamp = movie->seek_point;
249         // add the stream start time, should it exist
250         if (movie->format_ctx->start_time != AV_NOPTS_VALUE) {
251             if (timestamp > INT64_MAX - movie->format_ctx->start_time) {
252                 av_log(ctx, AV_LOG_ERROR,
253                        "%s: seek value overflow with start_time:%"PRId64" seek_point:%"PRId64"\n",
254                        movie->file_name, movie->format_ctx->start_time, movie->seek_point);
255                 return AVERROR(EINVAL);
256             }
257             timestamp += movie->format_ctx->start_time;
258         }
259         if ((ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD)) < 0) {
260             av_log(ctx, AV_LOG_ERROR, "%s: could not seek to position %"PRId64"\n",
261                    movie->file_name, timestamp);
262             return ret;
263         }
264     }
265
266     for (i = 0; i < movie->format_ctx->nb_streams; i++)
267         movie->format_ctx->streams[i]->discard = AVDISCARD_ALL;
268
269     movie->st = av_calloc(nb_streams, sizeof(*movie->st));
270     if (!movie->st)
271         return AVERROR(ENOMEM);
272
273     for (i = 0; i < nb_streams; i++) {
274         spec = av_strtok(stream_specs, "+", &cursor);
275         if (!spec)
276             return AVERROR_BUG;
277         stream_specs = NULL; /* for next strtok */
278         st = find_stream(ctx, movie->format_ctx, spec);
279         if (!st)
280             return AVERROR(EINVAL);
281         st->discard = AVDISCARD_DEFAULT;
282         movie->st[i].st = st;
283         movie->max_stream_index = FFMAX(movie->max_stream_index, st->index);
284     }
285     if (av_strtok(NULL, "+", &cursor))
286         return AVERROR_BUG;
287
288     movie->out_index = av_calloc(movie->max_stream_index + 1,
289                                  sizeof(*movie->out_index));
290     if (!movie->out_index)
291         return AVERROR(ENOMEM);
292     for (i = 0; i <= movie->max_stream_index; i++)
293         movie->out_index[i] = -1;
294     for (i = 0; i < nb_streams; i++)
295         movie->out_index[movie->st[i].st->index] = i;
296
297     for (i = 0; i < nb_streams; i++) {
298         AVFilterPad pad = { 0 };
299         snprintf(name, sizeof(name), "out%d", i);
300         pad.type          = movie->st[i].st->codec->codec_type;
301         pad.name          = av_strdup(name);
302         pad.config_props  = movie_config_output_props;
303         pad.request_frame = movie_request_frame;
304         ff_insert_outpad(ctx, i, &pad);
305         ret = open_stream(ctx, &movie->st[i]);
306         if (ret < 0)
307             return ret;
308         if ( movie->st[i].st->codec->codec->type == AVMEDIA_TYPE_AUDIO &&
309             !movie->st[i].st->codec->channel_layout) {
310             ret = guess_channel_layout(&movie->st[i], i, ctx);
311             if (ret < 0)
312                 return ret;
313         }
314     }
315
316     if (!(movie->frame = avcodec_alloc_frame()) ) {
317         av_log(log, AV_LOG_ERROR, "Failed to alloc frame\n");
318         return AVERROR(ENOMEM);
319     }
320
321     av_log(ctx, AV_LOG_VERBOSE, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
322            movie->seek_point, movie->format_name, movie->file_name,
323            movie->stream_index);
324
325     return 0;
326 }
327
328 static av_cold void movie_uninit(AVFilterContext *ctx)
329 {
330     MovieContext *movie = ctx->priv;
331     int i;
332
333     for (i = 0; i < ctx->nb_outputs; i++) {
334         av_freep(&ctx->output_pads[i].name);
335         if (movie->st[i].st)
336             avcodec_close(movie->st[i].st->codec);
337     }
338     av_opt_free(movie);
339     av_freep(&movie->file_name);
340     av_freep(&movie->st);
341     av_freep(&movie->out_index);
342     av_freep(&movie->frame);
343     if (movie->format_ctx)
344         avformat_close_input(&movie->format_ctx);
345 }
346
347 static int movie_query_formats(AVFilterContext *ctx)
348 {
349     MovieContext *movie = ctx->priv;
350     int list[] = { 0, -1 };
351     int64_t list64[] = { 0, -1 };
352     int i;
353
354     for (i = 0; i < ctx->nb_outputs; i++) {
355         MovieStream *st = &movie->st[i];
356         AVCodecContext *c = st->st->codec;
357         AVFilterLink *outlink = ctx->outputs[i];
358
359         switch (c->codec_type) {
360         case AVMEDIA_TYPE_VIDEO:
361             list[0] = c->pix_fmt;
362             ff_formats_ref(ff_make_format_list(list), &outlink->in_formats);
363             break;
364         case AVMEDIA_TYPE_AUDIO:
365             list[0] = c->sample_fmt;
366             ff_formats_ref(ff_make_format_list(list), &outlink->in_formats);
367             list[0] = c->sample_rate;
368             ff_formats_ref(ff_make_format_list(list), &outlink->in_samplerates);
369             list64[0] = c->channel_layout;
370             ff_channel_layouts_ref(avfilter_make_format64_list(list64),
371                                    &outlink->in_channel_layouts);
372             break;
373         }
374     }
375
376     return 0;
377 }
378
379 static int movie_config_output_props(AVFilterLink *outlink)
380 {
381     AVFilterContext *ctx = outlink->src;
382     MovieContext *movie  = ctx->priv;
383     unsigned out_id = FF_OUTLINK_IDX(outlink);
384     MovieStream *st = &movie->st[out_id];
385     AVCodecContext *c = st->st->codec;
386
387     outlink->time_base = st->st->time_base;
388
389     switch (c->codec_type) {
390     case AVMEDIA_TYPE_VIDEO:
391         outlink->w          = c->width;
392         outlink->h          = c->height;
393         outlink->frame_rate = st->st->r_frame_rate;
394         break;
395     case AVMEDIA_TYPE_AUDIO:
396         break;
397     }
398
399     return 0;
400 }
401
402 static AVFilterBufferRef *frame_to_buf(enum AVMediaType type, AVFrame *frame,
403                                        AVFilterLink *outlink)
404 {
405     AVFilterBufferRef *buf, *copy;
406
407     buf = avfilter_get_buffer_ref_from_frame(type, frame,
408                                              AV_PERM_WRITE |
409                                              AV_PERM_PRESERVE |
410                                              AV_PERM_REUSE2);
411     if (!buf)
412         return NULL;
413     buf->pts = av_frame_get_best_effort_timestamp(frame);
414     copy = ff_copy_buffer_ref(outlink, buf);
415     if (!copy)
416         return NULL;
417     buf->buf->data[0] = NULL; /* it belongs to the frame */
418     avfilter_unref_buffer(buf);
419     return copy;
420 }
421
422 static char *describe_bufref_to_str(char *dst, size_t dst_size,
423                                     AVFilterBufferRef *buf,
424                                     AVFilterLink *link)
425 {
426     switch (buf->type) {
427     case AVMEDIA_TYPE_VIDEO:
428         snprintf(dst, dst_size,
429                  "video pts:%s time:%s pos:%"PRId64" size:%dx%d aspect:%d/%d",
430                  av_ts2str(buf->pts), av_ts2timestr(buf->pts, &link->time_base),
431                  buf->pos, buf->video->w, buf->video->h,
432                  buf->video->sample_aspect_ratio.num,
433                  buf->video->sample_aspect_ratio.den);
434                  break;
435     case AVMEDIA_TYPE_AUDIO:
436         snprintf(dst, dst_size,
437                  "audio pts:%s time:%s pos:%"PRId64" samples:%d",
438                  av_ts2str(buf->pts), av_ts2timestr(buf->pts, &link->time_base),
439                  buf->pos, buf->audio->nb_samples);
440                  break;
441     default:
442         snprintf(dst, dst_size, "%s BUG", av_get_media_type_string(buf->type));
443         break;
444     }
445     return dst;
446 }
447
448 #define describe_bufref(buf, link) \
449     describe_bufref_to_str((char[1024]){0}, 1024, buf, link)
450
451 static int rewind_file(AVFilterContext *ctx)
452 {
453     MovieContext *movie = ctx->priv;
454     int64_t timestamp = movie->seek_point;
455     int ret, i;
456
457     if (movie->format_ctx->start_time != AV_NOPTS_VALUE)
458         timestamp += movie->format_ctx->start_time;
459     ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD);
460     if (ret < 0) {
461         av_log(ctx, AV_LOG_ERROR, "Unable to loop: %s\n", av_err2str(ret));
462         movie->loop_count = 1; /* do not try again */
463         return ret;
464     }
465
466     for (i = 0; i < ctx->nb_outputs; i++) {
467         avcodec_flush_buffers(movie->st[i].st->codec);
468         movie->st[i].done = 0;
469     }
470     movie->eof = 0;
471     return 0;
472 }
473
474 /**
475  * Try to push a frame to the requested output.
476  *
477  * @return  1 if a frame was pushed on the requested output,
478  *          0 if another attempt is possible,
479  *          <0 AVERROR code
480  */
481 static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
482 {
483     MovieContext *movie = ctx->priv;
484     AVPacket *pkt = &movie->pkt;
485     MovieStream *st;
486     int ret, got_frame = 0, pkt_out_id;
487     AVFilterLink *outlink;
488     AVFilterBufferRef *buf;
489
490     if (!pkt->size) {
491         if (movie->eof) {
492             if (movie->st[out_id].done) {
493                 if (movie->loop_count != 1) {
494                     ret = rewind_file(ctx);
495                     if (ret < 0)
496                         return ret;
497                     movie->loop_count -= movie->loop_count > 1;
498                     av_log(ctx, AV_LOG_VERBOSE, "Stream finished, looping.\n");
499                     return 0; /* retry */
500                 }
501                 return AVERROR_EOF;
502             }
503             /* packet is already ready for flushing */
504         } else {
505             ret = av_read_frame(movie->format_ctx, &movie->pkt0);
506             if (ret < 0) {
507                 av_init_packet(&movie->pkt0); /* ready for flushing */
508                 *pkt = movie->pkt0;
509                 if (ret == AVERROR_EOF) {
510                     movie->eof = 1;
511                     return 0; /* start flushing */
512                 }
513                 return ret;
514             }
515             *pkt = movie->pkt0;
516         }
517     }
518
519     pkt_out_id = pkt->stream_index > movie->max_stream_index ? -1 :
520                  movie->out_index[pkt->stream_index];
521     if (pkt_out_id < 0) {
522         av_free_packet(&movie->pkt0);
523         pkt->size = 0; /* ready for next run */
524         pkt->data = NULL;
525         return 0;
526     }
527     st = &movie->st[pkt_out_id];
528     outlink = ctx->outputs[pkt_out_id];
529
530     switch (st->st->codec->codec_type) {
531     case AVMEDIA_TYPE_VIDEO:
532         ret = avcodec_decode_video2(st->st->codec, movie->frame, &got_frame, pkt);
533         break;
534     case AVMEDIA_TYPE_AUDIO:
535         ret = avcodec_decode_audio4(st->st->codec, movie->frame, &got_frame, pkt);
536         break;
537     default:
538         ret = AVERROR(ENOSYS);
539         break;
540     }
541     if (ret < 0) {
542         av_log(ctx, AV_LOG_WARNING, "Decode error: %s\n", av_err2str(ret));
543         return 0;
544     }
545     if (!ret)
546         ret = pkt->size;
547
548     pkt->data += ret;
549     pkt->size -= ret;
550     if (pkt->size <= 0) {
551         av_free_packet(&movie->pkt0);
552         pkt->size = 0; /* ready for next run */
553         pkt->data = NULL;
554     }
555     if (!got_frame) {
556         if (!ret)
557             st->done = 1;
558         return 0;
559     }
560
561     buf = frame_to_buf(st->st->codec->codec_type, movie->frame, outlink);
562     if (!buf)
563         return AVERROR(ENOMEM);
564     av_dlog(ctx, "movie_push_frame(): file:'%s' %s\n", movie->file_name,
565             describe_bufref(buf, outlink));
566     switch (st->st->codec->codec_type) {
567     case AVMEDIA_TYPE_VIDEO:
568         if (!movie->frame->sample_aspect_ratio.num)
569             buf->video->sample_aspect_ratio = st->st->sample_aspect_ratio;
570         ff_start_frame(outlink, buf);
571         ff_draw_slice(outlink, 0, outlink->h, 1);
572         ff_end_frame(outlink);
573         break;
574     case AVMEDIA_TYPE_AUDIO:
575         ff_filter_samples(outlink, buf);
576         break;
577     }
578
579     return pkt_out_id == out_id;
580 }
581
582 static int movie_request_frame(AVFilterLink *outlink)
583 {
584     AVFilterContext *ctx = outlink->src;
585     unsigned out_id = FF_OUTLINK_IDX(outlink);
586     int ret;
587
588     while (1) {
589         ret = movie_push_frame(ctx, out_id);
590         if (ret)
591             return FFMIN(ret, 0);
592     }
593 }
594
595 #if CONFIG_MOVIE_FILTER
596
597 AVFilter avfilter_avsrc_movie = {
598     .name          = "movie",
599     .description   = NULL_IF_CONFIG_SMALL("Read from a movie source."),
600     .priv_size     = sizeof(MovieContext),
601     .init          = movie_init,
602     .uninit        = movie_uninit,
603     .query_formats = movie_query_formats,
604
605     .inputs    = (const AVFilterPad[]) {{ .name = NULL }},
606     .outputs   = (const AVFilterPad[]) {{ .name = NULL }},
607 };
608
609 #endif  /* CONFIG_MOVIE_FILTER */
610
611 #if CONFIG_AMOVIE_FILTER
612
613 AVFilter avfilter_avsrc_amovie = {
614     .name          = "amovie",
615     .description   = NULL_IF_CONFIG_SMALL("Read audio from a movie source."),
616     .priv_size     = sizeof(MovieContext),
617     .init          = movie_init,
618     .uninit        = movie_uninit,
619     .query_formats = movie_query_formats,
620
621     .inputs    = (const AVFilterPad[]) {{ .name = NULL }},
622     .outputs   = (const AVFilterPad[]) {{ .name = NULL }},
623 };
624
625 #endif /* CONFIG_AMOVIE_FILTER */