It is unreliable, especially when the stream codec context is not the encoding context. Use the codec descriptor properties instead.
Attach a file by drag & drop or click to upload