mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-02 06:23:23 +02:00
avcodec/h264_parser: Avoid adding SEI to the global header
Only consider SEI when no PPS has been found yet Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
12aab852c5
commit
9d6ad68fa4
@ -519,16 +519,19 @@ static int h264_split(AVCodecContext *avctx,
|
|||||||
int i;
|
int i;
|
||||||
uint32_t state = -1;
|
uint32_t state = -1;
|
||||||
int has_sps = 0;
|
int has_sps = 0;
|
||||||
|
int has_pps = 0;
|
||||||
|
|
||||||
for (i = 0; i <= buf_size; i++) {
|
for (i = 0; i <= buf_size; i++) {
|
||||||
if ((state & 0xFFFFFF1F) == 0x107)
|
if ((state & 0xFFFFFF1F) == 0x107)
|
||||||
has_sps = 1;
|
has_sps = 1;
|
||||||
|
if ((state & 0xFFFFFF1F) == 0x108)
|
||||||
|
has_pps = 1;
|
||||||
/* if ((state&0xFFFFFF1F) == 0x101 ||
|
/* if ((state&0xFFFFFF1F) == 0x101 ||
|
||||||
* (state&0xFFFFFF1F) == 0x102 ||
|
* (state&0xFFFFFF1F) == 0x102 ||
|
||||||
* (state&0xFFFFFF1F) == 0x105) {
|
* (state&0xFFFFFF1F) == 0x105) {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
if ((state & 0xFFFFFF00) == 0x100 && (state & 0xFFFFFF1F) != 0x106 &&
|
if ((state & 0xFFFFFF00) == 0x100 && ((state & 0xFFFFFF1F) != 0x106 || has_pps) &&
|
||||||
(state & 0xFFFFFF1F) != 0x107 && (state & 0xFFFFFF1F) != 0x108 &&
|
(state & 0xFFFFFF1F) != 0x107 && (state & 0xFFFFFF1F) != 0x108 &&
|
||||||
(state & 0xFFFFFF1F) != 0x109 && (state & 0xFFFFFF1F) != 0x10d &&
|
(state & 0xFFFFFF1F) != 0x109 && (state & 0xFFFFFF1F) != 0x10d &&
|
||||||
(state & 0xFFFFFF1F) != 0x10f) {
|
(state & 0xFFFFFF1F) != 0x10f) {
|
||||||
|
Loading…
Reference in New Issue
Block a user