On 02-05-2019 03:23 PM, Nicolas George wrote:
Gyan (12019-04-28):
b) ffmpeg will call avformat_write_header for the output, which will likely
fail because of the aforementioned codec parameter issues.
Are you sure? It looks to me like avformat_write_header() does not
perform checks by itself, and null does not either.
The flow is
avformat_write_header -> avformat_init_output -> init_muxer
And in the last function, lines 293-385 (as of 7eba26451) carry out the
checks, and which my patch skips.
The pipeline for dumping damaged streams is identical to dumping valid
streams except for the part when timestamps are regulated and codec fields
validated for the target muxer, which is what my patch disables for a single
muxer that doesn't need them. I don't see much (any?) "wasted" processing
with my patch, relative to streamcopying a valid stream.
The problem is not about waste as a performance issue, the problem is
about complexity as a maintenance issue. Exceptions are expensive in
that regard.
The problem is that there is no clean set of flags which isolate the
parameter-agnostic muxers - not surprising as this is a library for
making valid media files. A new flag could be invented, if the present
patch is too idiosyncratic. On a related note, as I mentioned elsewhere
in this thread, an existing flag AVFMT_NOTIMESTAMPS, which in theory I
could use, is of no help here, as it has been set for muxers which do
handle timestamps in some way.
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".