rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_a
authorMartin Storsjö <martin@martin.st>
Thu, 19 Feb 2015 19:28:01 +0000 (21:28 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 20 Feb 2015 17:29:39 +0000 (19:29 +0200)
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@martin.st>
libavformat/rtpdec_h264.c

index 8dab0d2..5b87529 100644 (file)
@@ -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);
             } 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
             }
 
             // eat what we handled