[FFmpeg-devel] [PATCH 2/2] mxfdec: fix return variable type for avio_seek

Michael Niedermayer michaelni at gmx.at
Fri Apr 19 01:32:22 CEST 2013


On Thu, Apr 18, 2013 at 09:58:21PM +0200, Marton Balint wrote:
> 
> On Thu, 11 Apr 2013, Marton Balint wrote:
> >
> >On Thu, 11 Apr 2013, Tomas Härdin wrote:
> >
> >>On Thu, 2013-04-11 at 01:09 +0200, Marton Balint wrote:
> >>>Signed-off-by: Marton Balint <cus at passwd.hu>
> >>>---
> >>> libavformat/mxfdec.c | 5 +++--
> >>> 1 file changed, 3 insertions(+), 2 deletions(-)
> >>>
> >>>diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> >>>index 9eeba55..b04fc25 100644
> >>>--- a/libavformat/mxfdec.c
> >>>+++ b/libavformat/mxfdec.c
> >>>@@ -2437,6 +2437,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;
> >>>
> >>>@@ -2451,8 +2452,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;
> >>
> >>Does avio_seek() ever return < INT_MIN?
> >>
> >
> >According to specs it returns AVERROR on error which is I think
> >safe to say is 32bit.
> >
> 
> Ping...

patch applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130419/0410d189/attachment.asc>


More information about the ffmpeg-devel mailing list