diff mbox series

[FFmpeg-devel,3/5] avformat/av1dec: refact, do not overide return value in read_obu

Message ID 20200806080416.17691-4-guangxin.xu@intel.com
State Changes Requested
Headers show
Series avformat/av1dec: add low overhead obu demux
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Xu Guangxin Aug. 6, 2020, 8:04 a.m. UTC
we need them later
---
 libavformat/av1dec.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c
index 297e87cc52..ec66152e03 100644
--- a/libavformat/av1dec.c
+++ b/libavformat/av1dec.c
@@ -60,14 +60,9 @@  static int leb(AVIOContext *pb, uint32_t *len) {
 static int read_obu(const uint8_t *buf, int size, int64_t *obu_size, int *type, int *has_size_flag)
 {
     int start_pos, temporal_id, spatial_id;
-    int len;
 
-    len = parse_obu_header(buf, size, obu_size, &start_pos,
+    return parse_obu_header(buf, size, obu_size, &start_pos,
                            type, &temporal_id, &spatial_id, has_size_flag);
-    if (len < 0)
-        return len;
-
-    return 0;
 }
 
 static int annexb_probe(const AVProbeData *p)
@@ -137,8 +132,8 @@  static int annexb_probe(const AVProbeData *p)
             break;
         }
 
-        temporal_unit_size -= obu_unit_size + ret;
-        frame_unit_size -= obu_unit_size + ret;
+        temporal_unit_size -= obu_unit_size;
+        frame_unit_size -= obu_unit_size;
     } while (frame_unit_size);
 
     return 0;