[FFmpeg-cvslog] lavf/segment: rename SegmentContext.pb to list_pb

Stefano Sabatini git at videolan.org
Wed Jul 4 00:05:33 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Jan 17 20:04:14 2012 +0100| [af392efe51d5cc3536cb3c75bce8954179222d18] | committer: Stefano Sabatini

lavf/segment: rename SegmentContext.pb to list_pb

The new name is more auto-explicative, as the pb is used for the segment
list file.

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

 libavformat/segment.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index e98f9b4..e83ae96 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -37,11 +37,11 @@ typedef struct {
     char *format;          ///< format to use for output segment files
     char *list;            ///< filename for the segment list file
     int   list_size;       ///< number of entries for the segment list file
+    AVIOContext *list_pb;  ///< list file put-byte context
     float time;            ///< segment duration
     int  wrap;             ///< number after which the index wraps
     int64_t recording_time;
     int has_video;
-    AVIOContext *pb;
 } SegmentContext;
 
 static int segment_start(AVFormatContext *s)
@@ -105,13 +105,13 @@ static int segment_end(AVFormatContext *s)
 
     if (seg->list) {
         if (seg->list_size && !(seg->number % seg->list_size)) {
-            avio_close(seg->pb);
-            if ((ret = avio_open2(&seg->pb, seg->list, AVIO_FLAG_WRITE,
+            avio_close(seg->list_pb);
+            if ((ret = avio_open2(&seg->list_pb, seg->list, AVIO_FLAG_WRITE,
                                   &s->interrupt_callback, NULL)) < 0)
                 goto end;
         }
-        avio_printf(seg->pb, "%s\n", oc->filename);
-        avio_flush(seg->pb);
+        avio_printf(seg->list_pb, "%s\n", oc->filename);
+        avio_flush(seg->list_pb);
     }
 
 end:
@@ -138,7 +138,7 @@ static int seg_write_header(AVFormatContext *s)
         return AVERROR(ENOMEM);
 
     if (seg->list)
-        if ((ret = avio_open2(&seg->pb, seg->list, AVIO_FLAG_WRITE,
+        if ((ret = avio_open2(&seg->list_pb, seg->list, AVIO_FLAG_WRITE,
                               &s->interrupt_callback, NULL)) < 0)
             goto fail;
 
@@ -192,7 +192,7 @@ fail:
             avformat_free_context(oc);
         }
         if (seg->list)
-            avio_close(seg->pb);
+            avio_close(seg->list_pb);
     }
     return ret;
 }
@@ -225,7 +225,7 @@ fail:
         oc->streams = NULL;
         oc->nb_streams = 0;
         if (seg->list)
-            avio_close(seg->pb);
+            avio_close(seg->list_pb);
         avformat_free_context(oc);
     }
 
@@ -238,7 +238,7 @@ static int seg_write_trailer(struct AVFormatContext *s)
     AVFormatContext *oc = seg->avf;
     int ret = segment_end(s);
     if (seg->list)
-        avio_close(seg->pb);
+        avio_close(seg->list_pb);
     oc->streams = NULL;
     oc->nb_streams = 0;
     avformat_free_context(oc);



More information about the ffmpeg-cvslog mailing list