[FFmpeg-cvslog] rtpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT

Martin Storsjö git at videolan.org
Thu Jan 10 10:32:23 CET 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Jan  8 23:21:15 2013 +0200| [71194ef6a8ffe7cfd32b0db465de9f1fd0202eb3] | committer: Martin Storsjö

rtpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT

This allows the caller to either include them (and get more packets
decoded, but possibly some nonperfect frames), or discard them (by
setting fflags=discardcorrupt).

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

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

 libavformat/rtpdec_vp8.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
index 96a1a34..c1bffaa 100644
--- a/libavformat/rtpdec_vp8.c
+++ b/libavformat/rtpdec_vp8.c
@@ -90,6 +90,8 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8,
             if (ret < 0)
                 return ret;
             *timestamp = vp8->timestamp;
+            if (vp8->sequence_dirty)
+                pkt->flags |= AV_PKT_FLAG_CORRUPT;
             return 0;
         }
         return AVERROR(EAGAIN);
@@ -199,6 +201,7 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8,
                     if (ret < 0)
                         return ret;
                     pkt->size = vp8->first_part_size;
+                    pkt->flags |= AV_PKT_FLAG_CORRUPT;
                     returned_old_frame = 1;
                     old_timestamp = vp8->timestamp;
                 } else {
@@ -261,6 +264,8 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8,
             return ret;
         if (vp8->broken_frame)
             pkt->size = vp8->first_part_size;
+        if (vp8->sequence_dirty)
+            pkt->flags |= AV_PKT_FLAG_CORRUPT;
         return 0;
     }
 



More information about the ffmpeg-cvslog mailing list