[FFmpeg-devel] [PATCH 5/6] ffmpeg: auto-insert setfield, tinterlace filters for MXF files with separate fields layout

Matthieu Bouron matthieu.bouron at gmail.com
Wed Jul 22 22:40:22 CEST 2015


On Wed, Jul 22, 2015 at 8:02 PM, wm4 <nfxjfg at googlemail.com> wrote:

> On Wed, 22 Jul 2015 15:29:46 +0200
> Matthieu Bouron <matthieu.bouron at gmail.com> wrote:
>
> > From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
> >
> > Fixes ticket #1102.
> > ---
> >  ffmpeg_filter.c | 25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
> > index 950e4d0..774ec1c 100644
> > --- a/ffmpeg_filter.c
> > +++ b/ffmpeg_filter.c
> > @@ -706,6 +706,8 @@ static int configure_input_video_filter(FilterGraph
> *fg, InputFilter *ifilter,
> >      int ret, pad_idx = 0;
> >      int64_t tsoffset = 0;
> >
> > +    AVDictionaryEntry *entry;
> > +
> >      if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
> >          av_log(NULL, AV_LOG_ERROR, "Cannot connect video filter to
> audio input\n");
> >          return AVERROR(EINVAL);
> > @@ -764,6 +766,29 @@ static int configure_input_video_filter(FilterGraph
> *fg, InputFilter *ifilter,
> >              return ret;
> >      }
> >
> > +    entry = av_dict_get(ist->st->metadata, "mxf_frame_layout", NULL, 0);
> > +    if (entry && entry->value &&
> > +        (!strcmp(entry->value, "separate_fields") ||
> > +         !strcmp(entry->value, "segmented_frame"))) {
>
> This is a terrible way to signal something this important...
>

Would you have any suggestions to implement this in a better way other than
using stream metadata ?

Thanks in advance,
Matthieu

[...]


More information about the ffmpeg-devel mailing list