[FFmpeg-cvslog] nutdec: more specific return codes for decode_syncpoint()

Michael Niedermayer git at videolan.org
Mon Mar 4 16:58:11 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Mar  4 16:51:21 2013 +0100| [9bb54bb68529114677b3764aa264ef0bf293557d] | committer: Michael Niedermayer

nutdec: more specific return codes for decode_syncpoint()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/nutdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 90afbdb..8896518 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -557,14 +557,14 @@ static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr)
     tmp       = ffio_read_varlen(bc);
     *back_ptr = nut->last_syncpoint_pos - 16 * ffio_read_varlen(bc);
     if (*back_ptr < 0)
-        return -1;
+        return AVERROR_INVALIDDATA;
 
     ff_nut_reset_ts(nut, nut->time_base[tmp % nut->time_base_count],
                     tmp / nut->time_base_count);
 
     if (skip_reserved(bc, end) || ffio_get_checksum(bc)) {
         av_log(s, AV_LOG_ERROR, "sync point checksum mismatch\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
 
     *ts = tmp / nut->time_base_count *



More information about the ffmpeg-cvslog mailing list