chromeos / cros-codecs

BSD 3-Clause "New" or "Revised" License
30 stars 11 forks source link

ccdec: do not assume h264 as the default coded format #14

Closed dwlsalmeida closed 1 year ago

dwlsalmeida commented 1 year ago

H.264 is very popular, but it is still not a good idea to simply assume it as a default.

Passing some random data as an h.264 stream crashes cros-codecs, or produces no useful output as no valid NALUs are parsed. This is the best-case scenario, but we should not rely on that.

Leave the responsibility of properly labelling the data to the user.

Gnurou commented 1 year ago

Yeah, that's very reasonable. I think I'll try to implement some kind of input format detection for the case where the input format is not explicitly specified. Differentiating between H.264 NALs, IVF and Matroska should not be hard.