Browse Source

lavf/segment: drop pointless variable oc from seg_write_packet()

tags/n2.2-rc1
Stefano Sabatini 11 years ago
parent
commit
f57baf743f
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      libavformat/segment.c

+ 1
- 4
libavformat/segment.c View File

@@ -657,7 +657,6 @@ fail:
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;
@@ -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;

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);
@@ -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));

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)


Loading…
Cancel
Save