[FFmpeg-cvslog] h2645_parse: don't overread AnnexB NALs within an avc stream

2016-08-24 Thread Hendrik Leppkes
ffmpeg | branch: release/3.1 | Hendrik Leppkes  | Thu Jul  
7 20:19:51 2016 +0200| [0ad4d4198a40f3907b77390d525bf6fd7868538f] | committer: 
Michael Niedermayer

h2645_parse: don't overread AnnexB NALs within an avc stream

We know the maximum size of an AnnexB NAL, signaling it as the maximum
NAL size allows ff_h2645_extract_rbsp to determine the correct size.

(cherry picked from commit 83a940e7fb9640954d631870e2ec6e8b3fc528ed)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ad4d4198a40f3907b77390d525bf6fd7868538f
---

 libavcodec/h2645_parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 50837b6..4d18de8 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -291,7 +291,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t 
*buf, int length,
 
 buf   += 3;
 length-= 3;
-extract_length = length;
+extract_length = FFMIN(length, next_avc - buf);
 
 if (buf >= next_avc) {
 /* skip to the start of the next NAL */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] h2645_parse: don't overread AnnexB NALs within an avc stream

2016-07-08 Thread Hendrik Leppkes
ffmpeg | branch: master | Hendrik Leppkes  | Thu Jul  7 
20:19:51 2016 +0200| [83a940e7fb9640954d631870e2ec6e8b3fc528ed] | committer: 
Hendrik Leppkes

h2645_parse: don't overread AnnexB NALs within an avc stream

We know the maximum size of an AnnexB NAL, signaling it as the maximum
NAL size allows ff_h2645_extract_rbsp to determine the correct size.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83a940e7fb9640954d631870e2ec6e8b3fc528ed
---

 libavcodec/h2645_parse.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 26f2e85..ef872fe 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -293,7 +293,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t 
*buf, int length,
 
 buf   += 3;
 length-= 3;
-extract_length = length;
+extract_length = FFMIN(length, next_avc - buf);
 
 if (buf >= next_avc) {
 /* skip to the start of the next NAL */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog