{
VideoState *is = arg;
AVFormatContext *ic;
- int err, i, ret, video_index, audio_index, use_play;
+ int err, i, ret, video_index, audio_index;
AVPacket pkt1, *pkt = &pkt1;
AVFormatParameters params, *ap = ¶ms;
url_set_interrupt_cb(decode_interrupt_cb);
memset(ap, 0, sizeof(*ap));
- ap->initial_pause = 1; /* we force a pause when starting an RTSP
- stream */
ap->width = frame_width;
ap->height= frame_height;
goto fail;
}
is->ic = ic;
-#ifdef CONFIG_RTSP_DEMUXER
- use_play = (ic->iformat == &rtsp_demuxer);
-#else
- use_play = 0;
-#endif
if(genpts)
ic->flags |= AVFMT_FLAG_GENPTS;
- if (!use_play) {
err = av_find_stream_info(ic);
if (err < 0) {
fprintf(stderr, "%s: could not find codec parameters\n", is->filename);
goto fail;
}
ic->pb.eof_reached= 0; //FIXME hack, ffplay maybe should not use url_feof() to test for the end
- }
/* if seeking requested, we execute it */
if (start_time != AV_NOPTS_VALUE) {
}
}
- /* now we can begin to play (RTSP stream only) */
- av_read_play(ic);
-
- if (use_play) {
- err = av_find_stream_info(ic);
- if (err < 0) {
- fprintf(stderr, "%s: could not find codec parameters\n", is->filename);
- ret = -1;
- goto fail;
- }
- }
-
for(i = 0; i < ic->nb_streams; i++) {
AVCodecContext *enc = ic->streams[i]->codec;
switch(enc->codec_type) {