[FFmpeg-cvslog] avformat/flvdec: re enable flv_data_packet()

Michael Niedermayer git at videolan.org
Fri Mar 13 16:47:44 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan 20 23:56:17 2015 +0100| [1df64d6c46ed522e74ebf082a0ea3f0dcadc1950] | committer: Michael Niedermayer

avformat/flvdec: re enable flv_data_packet()

Found-by: kurosu
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/flvdec.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 578be5d..0d8b3ac 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -830,10 +830,15 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
                 goto skip;
         } else if (type == FLV_TAG_TYPE_META) {
             stream_type=FLV_STREAM_TYPE_DATA;
-            if (size > 13 + 1 + 4 && dts == 0) { // Header-type metadata stuff
+            if (size > 13 + 1 + 4) { // Header-type metadata stuff
+                int type;
                 meta_pos = avio_tell(s->pb);
-                if (flv_read_metabody(s, next) <= 0) {
+                type = flv_read_metabody(s, next);
+                if (type == 0 && dts == 0 || type < 0) {
                     goto skip;
+                } else if (type == TYPE_ONTEXTDATA) {
+                    avpriv_request_sample(s, "OnTextData packet");
+                    return flv_data_packet(s, pkt, dts, next);
                 }
                 avio_seek(s->pb, meta_pos, SEEK_SET);
             }



More information about the ffmpeg-cvslog mailing list