From 3b366c3aa0800d2df9f0678f6f4d7791b8adf2a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Wed, 9 Jan 2013 14:25:22 +0200
Subject: [PATCH] rtpdec_vp8: Simplify code by using an existing helper
 function
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Martin Storsjö <martin@martin.st>
---
 libavformat/rtpdec_vp8.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
index c1bffaac0dd..b7d5345ab7e 100644
--- a/libavformat/rtpdec_vp8.c
+++ b/libavformat/rtpdec_vp8.c
@@ -225,11 +225,8 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8,
 
         if (vp8->timestamp != *timestamp) {
             // Missed the start of the new frame, sequence broken
-            vp8->sequence_ok = 0;
-            av_log(ctx, AV_LOG_WARNING,
-                   "Received no start marker; dropping frame\n");
-            vp8_free_buffer(vp8);
-            return AVERROR(EAGAIN);
+            return vp8_broken_sequence(ctx, vp8,
+                                       "Received no start marker; dropping frame\n");
         }
 
         if (seq != expected_seq) {
-- 
GitLab