changeset 2123:ffd1de292ea7 libavformat

skip no more needed on error
author bcoudurier
date Sun, 03 Jun 2007 18:04:33 +0000
parents c0aaeec2cf65
children ac7714d41b0d
files mxf.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mxf.c	Sun Jun 03 17:53:15 2007 +0000
+++ b/mxf.c	Sun Jun 03 18:04:33 2007 +0000
@@ -297,16 +297,20 @@
     // source klv key
     klv_decode_ber_length(pb);
     get_buffer(pb, klv->key, 16);
-    if (!IS_KLV_KEY(klv, mxf_essence_element_key)) goto err_out;
+    if (!IS_KLV_KEY(klv, mxf_essence_element_key))
+        return -1;
     index = mxf_get_stream_index(s, klv);
-    if (index < 0) goto err_out;
+    if (index < 0)
+        return -1;
     // source size
     klv_decode_ber_length(pb);
     orig_size = get_be64(pb);
-    if (orig_size < plaintext_size) goto err_out;
+    if (orig_size < plaintext_size)
+        return -1;
     // enc. code
     size = klv_decode_ber_length(pb);
-    if (size < 32 || size - 32 < orig_size) goto err_out;
+    if (size < 32 || size - 32 < orig_size)
+        return -1;
     get_buffer(pb, ivec, 16);
     get_buffer(pb, tmpbuf, 16);
     if (mxf->aesc)
@@ -323,10 +327,6 @@
     pkt->stream_index = index;
     url_fskip(pb, end - url_ftell(pb));
     return 0;
-
-err_out:
-    url_fskip(pb, end - url_ftell(pb));
-    return -1;
 }
 
 static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)