diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-01-17 20:04:14 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-04 00:02:56 +0200 |
commit | af392efe51d5cc3536cb3c75bce8954179222d18 (patch) | |
tree | 2414fe162effd459c7c51df2b5a585762e2b40b8 | |
parent | d8013f38ab73b15c5041f2489fc0b8bb45512e24 (diff) | |
download | ffmpeg-af392efe51d5cc3536cb3c75bce8954179222d18.tar.gz |
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.
-rw-r--r-- | libavformat/segment.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index e98f9b4090..e83ae9671b 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); |