diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-12 03:27:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-12 03:28:15 +0100 |
commit | 9d6ad68fa445b5e160a9277c250cf3238c373a3a (patch) | |
tree | 14f85c738430d7f4deb32a7cbf44333b06f4c15f | |
parent | 12aab852c58d15efeea6d190b0fb1368ea45b501 (diff) | |
download | ffmpeg-9d6ad68fa445b5e160a9277c250cf3238c373a3a.tar.gz |
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>
-rw-r--r-- | libavcodec/h264_parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index d0592ad5f8..6e87efabe8 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -519,16 +519,19 @@ static int h264_split(AVCodecContext *avctx, int i; uint32_t state = -1; int has_sps = 0; + int has_pps = 0; for (i = 0; i <= buf_size; i++) { if ((state & 0xFFFFFF1F) == 0x107) has_sps = 1; + if ((state & 0xFFFFFF1F) == 0x108) + has_pps = 1; /* if ((state&0xFFFFFF1F) == 0x101 || * (state&0xFFFFFF1F) == 0x102 || * (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) != 0x109 && (state & 0xFFFFFF1F) != 0x10d && (state & 0xFFFFFF1F) != 0x10f) { |