On Mon, 29 Dec 2014, Derek Buitenhuis wrote:

On 12/29/2014 2:20 PM, Martin Storsjö wrote:
Use the more generic approach with the delay_moov flag, instead of
having a update mechanism specific to this one single atom.
---
 libavformat/movenc.c | 20 ++++----------------
 libavformat/movenc.h |  1 -
 2 files changed, 4 insertions(+), 17 deletions(-)

[...]

+        av_log(NULL, AV_LOG_WARNING,
+               "moov atom written before any packets, unable to write correct "
+               "dvc1 atom. Set the delay_moov flag to fix this.\n");

Won't this result in broken file?

Probably not too broken - the few bits we can't deduce without looking at the individual packets are set to sane defaults. There are bits for indicating "this stream won't contain multiple sequence headers" or "this stream won't contain multiple entrypoints" (I'm not too familiar with VC1 so I don't remember exactly what this means), and if in doubt we set them to 0, saying that the stream might contain that.

Our own demuxer doesn't look at these fields at all.

All in all I think it's easier to just go this way, than to keep an extra hack just for the hypothetical case of people writing vc1 with our mp4 muxer, fragmented with empty_moov. (The only real case of using vc1 in mp4 would be for smooth streaming, and in those cases, nothing of the moov atom is even transmitted over the wire.)

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to