[Ffmpeg-cvslog] r7094 - trunk/libavformat/libnut.c

ods15 subversion
Thu Nov 16 08:33:27 CET 2006


Author: ods15
Date: Thu Nov 16 08:33:25 2006
New Revision: 7094

Modified:
   trunk/libavformat/libnut.c

Log:
Update to libnut API, non-negative errors


Modified: trunk/libavformat/libnut.c
==============================================================================
--- trunk/libavformat/libnut.c	(original)
+++ trunk/libavformat/libnut.c	Thu Nov 16 08:33:25 2006
@@ -206,7 +206,7 @@
     int ret, i;
 
     if ((ret = nut_read_headers(nut, &s, NULL))) {
-        if (ret < 0) av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(-ret));
+        av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(ret));
         nut_demuxer_uninit(nut);
         return -1;
     }
@@ -262,10 +262,13 @@
     nut_packet_t pd;
     int ret;
 
-    while ((ret = nut_read_next_packet(priv->nut, &pd)) < 0)
-        av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(-ret));
+    ret = nut_read_next_packet(priv->nut, &pd);
 
-    if (ret || av_new_packet(pkt, pd.len) < 0) return -1;
+    if (ret || av_new_packet(pkt, pd.len) < 0) {
+        if (ret != NUT_ERR_EOF)
+            av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(ret));
+        return -1;
+    }
 
     if (pd.flags & NUT_FLAG_KEY) pkt->flags |= PKT_FLAG_KEY;
     pkt->pts = pd.pts;




More information about the ffmpeg-cvslog mailing list