[FFmpeg-devel] [PATCH 2/2] avfilter: Dont partially merge lists
Nicolas George
nicolas.george at normalesup.org
Mon Jul 22 12:47:51 CEST 2013
Le quartidi 4 thermidor, an CCXXI, Michael Niedermayer a écrit :
> This prevents the unneeded insertion of multiple aresample filters in some cases
>
> The format merging is moved to avoid having to call the channel layout
> merge twice (which currently does not work as dry run mode with ff_merge_channel_layouts()
> does not work
I am rather surprised this is necessary, and there is something going on I
do not understand yet. If I take the example case you sent me, it starts
like that:
+---+ +-------+ +---+
|in |----------------------->|aformat|----------------------->|out|
|flt| | * | |s16|
|6ch| | 2ch | | * |
+---+ +-------+ +---+
The merge of the first link will fail because 6ch is not compatible with
2ch, so it becomes:
+---+ +-------+ +-------+ +---+
|in |------>|arsmple|------->|aformat|----------------------->|out|
|flt| | * | * | | * | |s16|
|6ch| | * | * | | 2ch | | * |
+---+ +-------+ +-------+ +---+
Then the links around aresample are merged, both with success:
+---+ +-------+ +-------+ +---+
|in |------>|arsmple|------->|aformat|----------------------->|out|
|flt| |flt| * | | * | |s16|
|6ch| |6ch|2ch| | 2ch | | * |
+---+ +-------+ +-------+ +---+
Then the link between aformat and out get merged (contaminating the link
between aresample and aformat since aformat does not convert):
+---+ +-------+ +-------+ +---+
|in |------>|arsmple|------->|aformat|----------------------->|out|
|flt| |flt|s16| | s16 | |s16|
|6ch| |6ch|2ch| | 2ch | |2ch|
+---+ +-------+ +-------+ +---+
And finally lavfi can pick the formats on the links:
+---+ +-------+ +-------+ +---+
|in |------>|arsmple|------->|aformat|----------------------->|out|
|flt| flt |flt|s16| s16 | s16 | s16 |s16|
|6ch| 6ch |6ch|2ch| 2ch | 2ch | 2ch |2ch|
+---+ +-------+ +-------+ +---+
Unfortunately, it does not happen that way, and I do not understand why yet.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130722/105a4d76/attachment.asc>
More information about the ffmpeg-devel
mailing list