Read one packet and put it in 'pkt'. pts and flags are also
set. 'avformat_new_stream' can be called only if the flag
AVFMTCTX_NOHEADER is used and only in the calling thread (not in a
background thread).
@return 0 on success, < 0 on error.
Upon returning an error, pkt must be unreferenced by the caller.
Read one packet and put it in 'pkt'. pts and flags are also set. 'avformat_new_stream' can be called only if the flag AVFMTCTX_NOHEADER is used and only in the calling thread (not in a background thread). @return 0 on success, < 0 on error. Upon returning an error, pkt must be unreferenced by the caller.