Commit Graph

14 Commits

Author SHA1 Message Date
Michael Niedermayer cc13bc8c4f avcodec/h2645: Fix NAL unit padding
The parser changes have lost the support for the needed padding, this adds it back
Fixes out of array reads
Fixes: 03ea21d271abc8acf428d42ace51d8b4/asan_heap-oob_3358eef_5692_16f0cc01ab5225e9ce591659e5c20e35.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-18 23:36:18 +02:00
Timothy Gu 826c780c12 Revert "Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'""
This reverts commit e4af9be0f4 and redoes
796027f221.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-03 17:45:52 -07:00
Timothy Gu e4af9be0f4 Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'"
This reverts commit 796027f221, reversing
changes made to bca30ed2b6.

Preemptive revert before further testing has been done.
2016-08-03 17:06:55 -07:00
Timothy Gu 796027f221 Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'
* commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22':
  h264: fix the check for mixed IDR/non-IDR slices

Conflicts:
	libavcodec/h264_slice.c
	libavcodec/h264dec.c

Merged-by: Timothy Gu <timothygu99@gmail.com>
2016-08-03 15:59:51 -07:00
Timothy Gu bca30ed2b6 Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'
* commit 'b13fc1e344011949929975a3451f78f226aa1de3':
  h264: do not pass H264Context to h264_slice_header_parse()

Conflicts:
	libavcodec/h264dec.h

Did not merge the h264_slice_header_parse() part. We use a few other
members of H264Context for error checking in that function.

Merged-by: Timothy Gu <timothygu99@gmail.com>
2016-08-03 15:41:59 -07:00
James Almer 613c86299f avcodec/h264dec: move ff_h264_ps_uninit prototype to h264_ps.h
It's the proper place since 8c7932884d

Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-03 00:36:09 -03:00
James Almer 8c7932884d Merge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'
* commit 'f638b67e5790735f34620bf82025c9b9d6fc7216':
  h264: move the parameter set definitions to a new header file

Conflicts:
libavcodec/h264_parse.h
libavcodec/h264_ps.c
libavcodec/h264dec.h

Merged-by: James Almer <jamrial@gmail.com>
2016-08-01 12:58:09 -03:00
Clément Bœsch ecf65c30cf Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'
* commit '251cbb44003caf179fb17afbb8a6c56643c2a646':
  h264: create a new header for common h264 definitions

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 11:13:44 +02:00
Clément Bœsch 15b26e88cb Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'
* commit '9df889a5f116c1ee78c2f239e0ba599c492431aa':
  h264: rename h264.[ch] to h264dec.[ch]

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 11:01:36 +02:00
Anton Khirnov d1d7678040 h264: fix the check for mixed IDR/non-IDR slices 2016-06-21 11:19:19 +02:00
Anton Khirnov b13fc1e344 h264: do not pass H264Context to h264_slice_header_parse()
This should make it more clear that this function does not need any
decoder-global state other than the parameter sets.
2016-06-21 11:18:44 +02:00
Anton Khirnov f638b67e57 h264: move the parameter set definitions to a new header file
The PS parsing code is independent from the decoder, so it makes more
sense for it to have its own separate header.
2016-06-21 11:13:29 +02:00
Anton Khirnov 251cbb4400 h264: create a new header for common h264 definitions
Move the NAL unit types into it. This will allow to stop including the
whole decoder-specific h264dec.h in some code that is unrelated to the
decoder and only needs some enum values.
2016-06-21 11:12:41 +02:00
Anton Khirnov 9df889a5f1 h264: rename h264.[ch] to h264dec.[ch]
This is more consistent with the naming of other decoders.
2016-06-21 11:11:26 +02:00