Mercurial > mplayer.hg
comparison libmpdemux/demux_lavf.c @ 34541:bdda068ba0a0
Only set "seekable", not "is_streamed" for compatibility with
newer FFmpeg versions.
author | reimar |
---|---|
date | Sat, 28 Jan 2012 13:13:29 +0000 |
parents | 11c8d827b55e |
children | 41574d60dc98 |
comparison
equal
deleted
inserted
replaced
34540:2b07cfa69882 | 34541:bdda068ba0a0 |
---|---|
520 | 520 |
521 if (!(priv->avif->flags & AVFMT_NOFILE)) { | 521 if (!(priv->avif->flags & AVFMT_NOFILE)) { |
522 priv->pb = avio_alloc_context(priv->buffer, BIO_BUFFER_SIZE, 0, | 522 priv->pb = avio_alloc_context(priv->buffer, BIO_BUFFER_SIZE, 0, |
523 demuxer, mp_read, NULL, mp_seek); | 523 demuxer, mp_read, NULL, mp_seek); |
524 priv->pb->read_seek = mp_read_seek; | 524 priv->pb->read_seek = mp_read_seek; |
525 priv->pb->is_streamed = !demuxer->stream->end_pos || (demuxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK; | 525 if (!demuxer->stream->end_pos || (demuxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK) |
526 priv->pb->seekable = priv->pb->is_streamed ? 0 : AVIO_SEEKABLE_NORMAL; | 526 priv->pb->seekable = 0; |
527 avfc->pb = priv->pb; | 527 avfc->pb = priv->pb; |
528 } | 528 } |
529 | 529 |
530 if(avformat_open_input(&avfc, mp_filename, priv->avif, NULL)<0){ | 530 if(avformat_open_input(&avfc, mp_filename, priv->avif, NULL)<0){ |
531 mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_open_input_stream() failed\n"); | 531 mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_open_input_stream() failed\n"); |