Re: [FFmpeg-devel] [PATCH 3/6] avformat/mxfdec: only disallow seek on metadata streams

2018-06-05 Thread Tomas Härdin
tor 2018-05-31 klockan 02:05 +0200 skrev Marton Balint:
> > Signed-off-by: Marton Balint 
> ---
>  libavformat/mxfdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index 3d8c8e204c..e80ef62d57 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -3447,7 +3447,7 @@ static int mxf_read_seek(AVFormatContext *s, int 
> stream_index, int64_t sample_ti
>  MXFIndexTable *t;
>  MXFTrack *source_track = st->priv_data;
>  
> -if(st->codecpar->codec_type == AVMEDIA_TYPE_DATA)
> +if (!source_track)
>  return 0;

This catches all streams that don't have timecode tracks, right? That
would probably be the most general and Correct(tm) way to do it. So
SourceTrack implies no timecode so this is of course OK

/Tomas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 3/6] avformat/mxfdec: only disallow seek on metadata streams

2018-05-30 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavformat/mxfdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 3d8c8e204c..e80ef62d57 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3447,7 +3447,7 @@ static int mxf_read_seek(AVFormatContext *s, int 
stream_index, int64_t sample_ti
 MXFIndexTable *t;
 MXFTrack *source_track = st->priv_data;
 
-if(st->codecpar->codec_type == AVMEDIA_TYPE_DATA)
+if (!source_track)
 return 0;
 
 /* if audio then truncate sample_time to EditRate */
-- 
2.16.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel