diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-07 14:38:49 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-11-06 21:55:15 +0100 |
commit | 563e6d860391bac0511984e5c0842320b5c94d2d (patch) | |
tree | 90f29bae358d003926af6b7394e83268fd90e1d9 | |
parent | 1e791ee3aae63122afb10cbabe86a747aea58992 (diff) | |
download | ffmpeg-563e6d860391bac0511984e5c0842320b5c94d2d.tar.gz |
segafilm: drop the "song and dance" for cinepak
This seems not to do anything any more since a long time, and removing
it avoids using uninitialized memory. Also change the error value
forwarding as done everywhere else.
Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-rw-r--r-- | libavformat/segafilm.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index bbbf7017ee..256c474d47 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -280,18 +280,9 @@ static int film_read_packet(AVFormatContext *s, /* position the stream (will probably be there anyway) */ avio_seek(pb, sample->sample_offset, SEEK_SET); - /* do a special song and dance when loading FILM Cinepak chunks */ - if ((sample->stream == film->video_stream_index) && - (film->video_type == AV_CODEC_ID_CINEPAK)) { - pkt->pos= avio_tell(pb); - if (av_new_packet(pkt, sample->sample_size)) - return AVERROR(ENOMEM); - avio_read(pb, pkt->data, sample->sample_size); - } else { - ret= av_get_packet(pb, pkt, sample->sample_size); - if (ret != sample->sample_size) - ret = AVERROR(EIO); - } + ret = av_get_packet(pb, pkt, sample->sample_size); + if (ret < 0) + return ret; pkt->stream_index = sample->stream; pkt->pts = sample->pts; |