[FFmpeg-devel,10/12] avformat/mxfdec: fix indentation and rename mxf_read_packet_old

Submitted by Marton Balint on June 10, 2018, 10:36 a.m.

Details

Message ID 20180610103650.10155-10-cus@passwd.hu
State New
Headers show

Commit Message

Marton Balint June 10, 2018, 10:36 a.m.
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/mxfdec.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

Comments

Tomas Härdin June 13, 2018, 3:24 p.m.
sön 2018-06-10 klockan 12:36 +0200 skrev Marton Balint:
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavformat/mxfdec.c | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c

Trivial stuff

/Tomas

Patch hide | download patch | download mbox

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index d6d1628edb..04ec302110 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3291,7 +3291,7 @@  static int mxf_set_pts(MXFContext *mxf, AVStream *st, AVPacket *pkt)
     return 0;
 }
 
-static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
+static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     KLVPacket klv;
     MXFContext *mxf = s->priv_data;
@@ -3302,22 +3302,22 @@  static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
         int64_t pos = avio_tell(s->pb);
 
         if (pos < mxf->current_klv_data.next_klv - mxf->current_klv_data.length || pos >= mxf->current_klv_data.next_klv) {
-        mxf->current_klv_data = (KLVPacket){{0}};
-        ret = klv_read_packet(&klv, s->pb);
-        if (ret < 0)
-            break;
-        max_data_size = klv.length;
-        pos = klv.next_klv - klv.length;
-        PRINT_KEY(s, "read packet", klv.key);
-        av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
-        if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
-            ret = mxf_decrypt_triplet(s, pkt, &klv);
-            if (ret < 0) {
-                av_log(s, AV_LOG_ERROR, "invalid encoded triplet\n");
-                return ret;
+            mxf->current_klv_data = (KLVPacket){{0}};
+            ret = klv_read_packet(&klv, s->pb);
+            if (ret < 0)
+                break;
+            max_data_size = klv.length;
+            pos = klv.next_klv - klv.length;
+            PRINT_KEY(s, "read packet", klv.key);
+            av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
+            if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
+                ret = mxf_decrypt_triplet(s, pkt, &klv);
+                if (ret < 0) {
+                    av_log(s, AV_LOG_ERROR, "invalid encoded triplet\n");
+                    return ret;
+                }
+                return 0;
             }
-            return 0;
-        }
         } else {
             klv = mxf->current_klv_data;
             max_data_size = klv.next_klv - pos;
@@ -3588,7 +3588,7 @@  AVInputFormat ff_mxf_demuxer = {
     .priv_data_size = sizeof(MXFContext),
     .read_probe     = mxf_probe,
     .read_header    = mxf_read_header,
-    .read_packet    = mxf_read_packet_old,
+    .read_packet    = mxf_read_packet,
     .read_close     = mxf_read_close,
     .read_seek      = mxf_read_seek,
 };