lavf/segment: drop pointless variable oc from seg_write_packet()
authorStefano Sabatini <stefasab@gmail.com>
Tue, 21 Jan 2014 19:06:49 +0000 (20:06 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Tue, 21 Jan 2014 19:08:36 +0000 (20:08 +0100)
libavformat/segment.c

index bf5f4fb407efe68a74c08bb48bd85eb9c152ee73..ad313a316fce6d2b7d74242e3d9b5e5b66d565e5 100644 (file)
@@ -657,7 +657,6 @@ fail:
 static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
     SegmentContext *seg = s->priv_data;
 static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
     SegmentContext *seg = s->priv_data;
-    AVFormatContext *oc = seg->avf;
     AVStream *st = s->streams[pkt->stream_index];
     int64_t end_pts = INT64_MAX, offset;
     int start_frame = INT_MAX;
     AVStream *st = s->streams[pkt->stream_index];
     int64_t end_pts = INT64_MAX, offset;
     int start_frame = INT_MAX;
@@ -690,8 +689,6 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
         if ((ret = segment_start(s, seg->individual_header_trailer)) < 0)
             goto fail;
 
         if ((ret = segment_start(s, seg->individual_header_trailer)) < 0)
             goto fail;
 
-        oc = seg->avf;
-
         seg->cur_entry.index = seg->segment_idx;
         seg->cur_entry.start_time = (double)pkt->pts * av_q2d(st->time_base);
         seg->cur_entry.start_pts = av_rescale_q(pkt->pts, st->time_base, AV_TIME_BASE_Q);
         seg->cur_entry.index = seg->segment_idx;
         seg->cur_entry.start_time = (double)pkt->pts * av_q2d(st->time_base);
         seg->cur_entry.start_pts = av_rescale_q(pkt->pts, st->time_base, AV_TIME_BASE_Q);
@@ -725,7 +722,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
            av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
            av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base));
 
            av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
            av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base));
 
-    ret = ff_write_chained(oc, pkt->stream_index, pkt, s);
+    ret = ff_write_chained(seg->avf, pkt->stream_index, pkt, s);
 
 fail:
     if (pkt->stream_index == seg->reference_stream_index)
 
 fail:
     if (pkt->stream_index == seg->reference_stream_index)