dict: K&R formatting cosmetics
rtmppkt: Handle extended timestamp field even for one-byte header

Related fix in "rtmpdump":
https://repo.or.cz/w/rtmpdump.git/commitdiff/79459a2

Adobe's RTMP specification (21 Dec 2012), section 5.3.1.3 ("Extended
Timestamp"), says "this field is present in Type 3 chunks". Type 3 chunks are
those with the one-byte header size.

This resolves intermittent hangs and segfaults caused by the read function,
and also includes an untested fix for the write function.

The read function was tested with ABC (Australia) News 24 streams, however
they are probably restricted to only Australian internet addresses. Some of
the packets at the start of these streams seem to contain junk timestamp
fields, often requiring the extended field. Test command:

avplay rtmp://cp81899.live.edgefcs.net/live/news24-med@28772

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmppkt: Add a descriptive comment

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmppkt: Properly handle extended timestamps when writing

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmppkt: Rename the ts_delta field to ts_field

Based on a suggestion by Martin Panter. This is more descriptive,
since it's the actual timestamp field from the RTMP packet,
which might or might not be a delta depending on context (in
some packets it's a delta, in some packets it's an absolute
timestamp, and in some packets it's 0xffffff to indicate that
the actual delta or absolute timestamp is transmitted separately).

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7'

* commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7':
  dict: K&R formatting cosmetics

Conflicts:
	libavutil/dict.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '5b2ad78f97d43299adcb038c04346999fe9b196c'

* commit '5b2ad78f97d43299adcb038c04346999fe9b196c':
  rtmppkt: Handle extended timestamp field even for one-byte header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '48cfb5f4114048383a4ee85b2f500eefce24cad2'

* commit '48cfb5f4114048383a4ee85b2f500eefce24cad2':
  rtmppkt: Add a descriptive comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
matroskadec: K&R formatting cosmetics

Also sort #includes into canonical order.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Merge commit '8bbb02ae4f44f1cddc1ce1e74a71fa2022e93da3'

* commit '8bbb02ae4f44f1cddc1ce1e74a71fa2022e93da3':
  rtmppkt: Properly handle extended timestamps when writing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
matroskadec: cosmetics: Fix "attachement" vs. "attachment" typo
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtmppkt: Rename the ts_delta field to ts_field

Merged-by: Michael Niedermayer <michaelni@gmx.at>
fic: Properly handle skip frames

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
dxva2_vc1: fix intensity compensation condition with interlaced fields

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dxva2_vc1: include the start code in wMBbitOffset

This resolves a decoding failure on Intel GPUs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc: fix typo
Merge commit '84cfce9f99805a144df684417e166c1ae6f95421'

* commit '84cfce9f99805a144df684417e166c1ae6f95421':
  matroskadec: K&R formatting cosmetics

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'f69befe5eefef12172a6479dd9cef3c01bddec7a'

* commit 'f69befe5eefef12172a6479dd9cef3c01bddec7a':
  matroskadec: cosmetics: Fix "attachement" vs. "attachment" typo

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  fic: Properly handle skip frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wmadec: initialize max_exponent to valid values

Fixes generation of NaN output
Fixes: nan_example.wma
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>