On 23.07.2017 18:07, Nicolas George wrote:

[...]
Maybe it's just me, but I am not sure what kind of probing are you referring
to. Could you explain in a bit more detail how the changed code should work?

The same way it works for formats without global header, for example
MPEG-PS: read_header() does not create any stream; read_packet() creates
the stream when it sees a packet for one that does not exist yet. And
libavformat takes care of the rest. I think it requires
AVFMTCTX_NOHEADER.

absolutely

I guess that is copied from decklink as well. As far as I see, the correct
replacement is to set codecpar->field_order in read_header, and that is it,
right?

I think so.

ok

I think it is better if it works with unkown channel layouts as well, as
long as the number of channels are supported.

I do not agree, and especially not in the device itself. There are many
small issues where some component invents a default layout when only a
count is provided, and then we are unable to propagate a count without a
layout.


i seen no hard limitation about audio channel numbers in SDK, so let's leave it for future

+        av_log(avctx, AV_LOG_ERROR, "Only one video stream is supported!\n");
+        return AVERROR(ENOTSUP);
I suspect this library exists also for Windows and Macos, so you cannot
use ENOTSUP. EINVAL.
Or maybe ENOSYS?

ENOTSUP -> "Operation not supported" / "Not supported"
ENOSYS  -> "Function not implemented" / "Function not supported"
EINVAL  -> "Invalid argument"

In this case, the problem is that the avctx argument has several
streams: EINVAL is really the correct one.

i can use whatever you prefer

--
Maksym Veremeyenko

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to