mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-02-21 04:33:24 +00:00
avformat/mpeg: Remove unnecessary av_packet_unref()
Forgotten in 6a67d518. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
d643bd4960
commit
3875af84ed
@ -961,7 +961,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (pkt->size) // raise packet even if incomplete
|
if (pkt->size) // raise packet even if incomplete
|
||||||
break;
|
break;
|
||||||
goto fail;
|
return ret;
|
||||||
}
|
}
|
||||||
to_read = ret & 0xffff;
|
to_read = ret & 0xffff;
|
||||||
new_pos = avio_tell(pb);
|
new_pos = avio_tell(pb);
|
||||||
@ -978,7 +978,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
|
|
||||||
ret = av_grow_packet(pkt, to_read);
|
ret = av_grow_packet(pkt, to_read);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
return ret;
|
||||||
|
|
||||||
n = avio_read(pb, pkt->data + (pkt->size - to_read), to_read);
|
n = avio_read(pb, pkt->data + (pkt->size - to_read), to_read);
|
||||||
if (n < to_read)
|
if (n < to_read)
|
||||||
@ -986,10 +986,6 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
} while (total_read < psize);
|
} while (total_read < psize);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
|
||||||
av_packet_unref(pkt);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vobsub_read_seek(AVFormatContext *s, int stream_index,
|
static int vobsub_read_seek(AVFormatContext *s, int stream_index,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user