Commit 169065fb authored by Stefano Sabatini's avatar Stefano Sabatini

lavf/segment: remove duplicated and inconsistent cleanup code in seg_write_packet()

In particular, avoid to leave around the seg->avf pointer to freed
structure, and fix crash with:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -f segment foo-%d.ts
parent a2e78161
......@@ -731,12 +731,6 @@ fail:
if (pkt->stream_index == seg->reference_stream_index)
seg->frame_count++;
if (ret < 0) {
if (seg->list)
avio_close(seg->list_pb);
avformat_free_context(oc);
}
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment