]> git.sesse.net Git - mlt/commitdiff
Disable new_seek on h264/ts from non-seekable source (udp, pipe).
authorDan Dennedy <dan@dennedy.org>
Thu, 9 Jun 2011 02:29:49 +0000 (19:29 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 9 Jun 2011 02:29:49 +0000 (19:29 -0700)
src/modules/avformat/producer_avformat.c

index bdcc4656aaa4b4e072b5ac3dac1deb2e7d0f8660..b3ecf7b95391e7cfee5d89ceb287e8ba8b5c8ee6 100644 (file)
@@ -1312,7 +1312,8 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                                  strcmp( codec_context->codec->name, "rawvideo" );
 
        // Turn on usage of new seek API and PTS for seeking
-       int use_new_seek = codec_context->codec_id == CODEC_ID_H264 && !strcmp( context->iformat->name, "mpegts" );
+       int use_new_seek = self->seekable &&
+               codec_context->codec_id == CODEC_ID_H264 && !strcmp( context->iformat->name, "mpegts" );
        if ( mlt_properties_get( properties, "new_seek" ) )
                use_new_seek = mlt_properties_get_int( properties, "new_seek" );