Message ID | 20200322034756.29907-3-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,01/21] avformat/nsvdec: Use av_packet_move_ref() for packet ownership transfer | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
Quoting Andreas Rheinhardt (2020-03-22 04:47:38) > Forgotten in 6a67d518. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavformat/mpeg.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) Looks ok
Anton Khirnov: > Quoting Andreas Rheinhardt (2020-03-22 04:47:38) >> Forgotten in 6a67d518. >> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> >> --- >> libavformat/mpeg.c | 8 ++------ >> 1 file changed, 2 insertions(+), 6 deletions(-) > > Looks ok > Applied, thanks. - Andreas
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index fad7c7fd55..eba5852266 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -961,7 +961,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) if (ret < 0) { if (pkt->size) // raise packet even if incomplete break; - goto fail; + return ret; } to_read = ret & 0xffff; 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); if (ret < 0) - goto fail; + return ret; n = avio_read(pb, pkt->data + (pkt->size - to_read), to_read); if (n < to_read) @@ -986,10 +986,6 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) } while (total_read < psize); return 0; - -fail: - av_packet_unref(pkt); - return ret; } static int vobsub_read_seek(AVFormatContext *s, int stream_index,
Forgotten in 6a67d518. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/mpeg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)