[Ffmpeg-cvslog] r5841 - trunk/libavformat/mxf.c

bcoudurier subversion
Sat Jul 29 01:07:03 CEST 2006


Author: bcoudurier
Date: Sat Jul 29 01:07:03 2006
New Revision: 5841

Modified:
   trunk/libavformat/mxf.c

Log:
use ternary

Modified: trunk/libavformat/mxf.c
==============================================================================
--- trunk/libavformat/mxf.c	(original)
+++ trunk/libavformat/mxf.c	Sat Jul 29 01:07:03 2006
@@ -197,10 +197,7 @@
     klv->offset = url_ftell(pb);
     get_buffer(pb, klv->key, 16);
     klv->length = klv_decode_ber_length(pb);
-    if (klv->length == -1)
-        return -1;
-    else
-        return 0;
+    return klv->length == -1 ? -1 : 0;
 }
 
 static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv)
@@ -227,9 +224,7 @@
         if (IS_KLV_KEY(klv.key, mxf_essence_element_key)) {
             av_get_packet(&s->pb, pkt, klv.length);
             pkt->stream_index = mxf_get_stream_index(s, &klv);
-            if (pkt->stream_index == -1)
-                return -1;
-            return 0;
+            return pkt->stream_index == -1 ? -1 : 0;
         } else
             url_fskip(&s->pb, klv.length);
     }




More information about the ffmpeg-cvslog mailing list