diff mbox

[FFmpeg-devel,v2,12/18] avformat/mov: ff_mov_read_stsd_entries now deals with AVMEDIA_TYPE_DATA

Message ID AMSPR07MB405ECD706746BB4F833AF489CE30@AMSPR07MB405.eurprd07.prod.outlook.com
State Superseded
Headers show

Commit Message

OZO Play and Live Aug. 31, 2016, 9:44 p.m. UTC
Hi all,

The OzoPL@nokia.com email address was used for sales and marketing queries and is no longer monitored. Should these messages be redirected elsewhere?

Liz

-----Original Message-----
From: Seppala Erkki (EXT-Vincit/Tampere) 

Sent: Wednesday, August 31, 2016 2:36 PM
To: ffmpeg-devel@ffmpeg.org
Cc: Seppala Erkki (EXT-Vincit/Tampere) <erkki.seppala.ext@nokia.com>; OZO Play and Live <OZOPL@nokia.com>
Subject: [PATCH v2 12/18] avformat/mov: ff_mov_read_stsd_entries now deals with AVMEDIA_TYPE_DATA

Signed-off-by: Erkki Seppälä <erkki.seppala.ext@nokia.com>

Signed-off-by: OZOPlayer <OZOPL@nokia.com>

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

             st->codecpar->codec_id = id;
             mov_parse_stsd_subtitle(c, pb, st, sc,
                                     size - (avio_tell(pb) - start_pos));
+        } else if (st->codecpar->codec_type==AVMEDIA_TYPE_DATA){
+            st->codecpar->codec_id = id;
+            ret = mov_parse_stsd_data(c, pb, st, sc,
+                                      size - (avio_tell(pb) - 
+ start_pos));
         } else {
             ret = mov_parse_stsd_data(c, pb, st, sc,
                                       size - (avio_tell(pb) - start_pos));
-            if (ret < 0)
-                return ret;
         }
+        if (ret < 0)
+            return ret;
         /* this will read extra atoms at the end (wave, alac, damr, avcC, hvcC, SMI ...) */
         a.size = size - (avio_tell(pb) - start_pos);
         if (a.size > 8) {
--
2.7.4
diff mbox

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c index 1012b3c..0544d13 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2257,6 +2257,7 @@  int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
                 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
                 (format >> 24) & 0xff, format, st->codecpar->codec_type);
 
+        ret = 0;
         if (st->codecpar->codec_type==AVMEDIA_TYPE_VIDEO) {
             st->codecpar->codec_id = id;
             mov_parse_stsd_video(c, pb, st, sc); @@ -2267,12 +2268,16 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)