[FFmpeg-cvslog] mxfdec: fix return variable type for avio_seek

Clément Bœsch ubitux at gmail.com
Fri Apr 19 01:36:34 CEST 2013


On Fri, Apr 19, 2013 at 01:31:01AM +0200, Marton Balint wrote:
> ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Thu Apr 11 01:09:41 2013 +0200| [007989c7a2215f54aeaf2393ab3aff0c208e862f] | committer: Michael Niedermayer
> 
> mxfdec: fix return variable type for avio_seek
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=007989c7a2215f54aeaf2393ab3aff0c208e862f
> ---
> 
>  libavformat/mxfdec.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index 33e1eb4..666e9c1 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -2441,6 +2441,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
>      MXFContext* mxf = s->priv_data;
>      int64_t seekpos;
>      int i, ret;
> +    int64_t ret64;
>      MXFIndexTable *t;
>      MXFTrack *source_track = st->priv_data;
>  
> @@ -2455,8 +2456,8 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
>          sample_time = 0;
>      seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den);
>  
> -    if ((ret = avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET)) < 0)
> -        return ret;
> +    if ((ret64 = avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET)) < 0)
> +        return ret64;
>      ff_update_cur_dts(s, st, sample_time);
>      mxf->current_edit_unit = sample_time;
>      } else {
> 

This makes me wonder if it wouldn't be relevant to check those as well:

% git grep '=.*avio_seek'
libavformat/anm.c:    ret = avio_seek(pb, anm->page_table_offset, SEEK_SET);
libavformat/asfdec.c:        int ret = avio_seek_time(s->pb, stream_index, pts, flags);
libavformat/gxf.c:    res = avio_seek(s->pb, pos, SEEK_SET);
libavformat/icodec.c:    if ((ret = avio_seek(pb, image->offset, SEEK_SET)) < 0)
libavformat/idcin.c:        int ret = avio_seek(s->pb, idcin->first_pkt_pos, SEEK_SET);
libavformat/mp3dec.c:    int64_t ret = avio_seek(s->pb, pos, SEEK_SET);
libavformat/mp3dec.c:    ret = avio_seek(s->pb, ie->pos, SEEK_SET);
libavformat/mp3dec.c:    ret = avio_seek(s->pb, ie->pos + i, SEEK_SET);
libavformat/mvdec.c:            ret = avio_seek(pb, index->pos, SEEK_SET);
libavformat/mxfdec.c:        if ((ret = avio_seek(pb, mxf->run_in + mxf->footer_partition, SEEK_SET)) < 0) {
libavformat/mxfdec.c:    if ((ret64 = avio_seek(s->pb, pos, SEEK_SET)) < 0)
libavformat/mxfdec.c:    if ((ret = avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET)) < 0)
libavformat/pcm.c:    if ((ret = avio_seek(s->pb, pos + s->data_offset, SEEK_SET)) < 0)
libavformat/utils.c:    if ((ret = avio_seek(s->pb, pos, SEEK_SET)) < 0)
libavformat/utils.c:            if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0)
libavformat/utils.c:            if ((ret = avio_seek(s->pb, s->data_offset, SEEK_SET)) < 0)
libavformat/utils.c:    if ((ret = avio_seek(s->pb, ie->pos, SEEK_SET)) < 0)
libavformat/vqf.c:    if ((ret = avio_seek(s->pb, ((pos-7) >> 3) + s->data_offset, SEEK_SET)) < 0)

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20130419/f2e7500a/attachment.asc>


More information about the ffmpeg-cvslog mailing list