[FFmpeg-cvslog] rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_a

Martin Storsjö git at videolan.org
Fri Feb 20 21:55:20 CET 2015


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Feb 19 21:28:01 2015 +0200| [176903ce833ce7469f411640e9748a0d549b5285] | committer: Martin Storsjö

rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_a

Previously, errors were only logged but the code kept on trying,
and never actually returning the error as a return value.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavformat/rtpdec_h264.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 8dab0d2..5b87529 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -208,6 +208,7 @@ static int h264_handle_packet_stap_a(AVFormatContext *ctx, AVPacket *pkt,
             } else {
                 av_log(ctx, AV_LOG_ERROR,
                        "nal size exceeds length: %d %d\n", nal_size, src_len);
+                return AVERROR_INVALIDDATA;
             }
 
             // eat what we handled



More information about the ffmpeg-cvslog mailing list