[FFmpeg-devel] [PATCH] flvdec: use flv_data_packet for TYPE_ONTEXTDATA

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Mar 12 20:57:10 CET 2015


This was lost in commit ae48547a.

It fixes the following compiler warning:
warning: 'flv_data_packet' defined but not used

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
 libavformat/flvdec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 1701f76..a51016e 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -832,8 +832,11 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
             stream_type=FLV_STREAM_TYPE_DATA;
             if (size > 13 + 1 + 4 && dts == 0) { // Header-type metadata stuff
                 meta_pos = avio_tell(s->pb);
-                if (flv_read_metabody(s, next) <= 0) {
+                ret = flv_read_metabody(s, next);
+                if (ret <= 0) {
                     goto skip;
+                } else if (ret == TYPE_ONTEXTDATA) {
+                    return flv_data_packet(s, pkt, dts, next);
                 }
                 avio_seek(s->pb, meta_pos, SEEK_SET);
             }
-- 
2.1.4


More information about the ffmpeg-devel mailing list