[MPlayer-dev-eng] [PATCH] DVDNAV Still frames supprt

Andrew Calkin calkina at geexbox.org
Fri Jan 25 04:42:30 CET 2008


Hi,

Does this block do what you intended it to do?

<SNIP>
@@ -2116,10 +2298,23 @@
 	update_subtitles(sh_video, mpctx->d_sub, 0);
 	update_teletext(sh_video, mpctx->demuxer, 0);
 	update_osd_msg();
+#ifdef USE_DVDNAV
+	if (mpctx->stream->type == STREAMTYPE_DVDNAV)
+	    decoded_frame = mp_dvdnav_decode_video_pre(&in_size,
+                                                       &start,decoded_frame);
+	/* if image has been stored, there's no need to call decode_video() */
+	if (in_size > 0 && !decoded_frame)
+#endif
 	current_module = "decode_video";
 	decoded_frame = decode_video(sh_video, start, in_size, drop_frame,
 				     sh_video->pts);
-	current_module = "filter_video";
+#ifdef USE_DVDNAV
+	if (mpctx->stream->type == STREAMTYPE_DVDNAV)
+	    decoded_frame = mp_dvdnav_decode_video_post(in_size,
+                                                        start,decoded_frame,
+                                                        sh_video, drop_frame);
+#endif
+        current_module = "filter_video";
 	*blit_frame = (decoded_frame && filter_video(sh_video, decoded_frame,
 						    sh_video->pts));
     }
</SNIP>

AFAICT, based on:

if (in_size > 0 && !decoded_frame) criteria, you only conditionally
set the current_module char pointer, but always call decode_video()
which seems to contradict the comment.


Also, in the comment:
+                    mp_msg(MSGT_CPLAYER,MSGL_ERR,
+                        "Can't decode still frame.\n"
+                        "Please, you try play dvdnav to -vc ffmpeg12
option.\n");

Probably:
"Can't decode still frame. Using dvdnav with -vc ffmpeg12 option recommended.\n"


//Andrew



More information about the MPlayer-dev-eng mailing list