[FFmpeg-devel] [PATCH] Allow drop frame timecode for 60000/1001 fps

Jason Livingston jettoblack at gmail.com
Tue Jan 22 18:42:13 CET 2013


It appears the calculations for drop frame in 60000/1001 fps were
already implemented, but attempting to use it gave this error message:
Drop frame is only allowed with 30000/1001 FPS

This patch enables drop frame time code with 60000/1001 fps media by
fixing the error message in libavutil/timecode.c

---
 libavutil/timecode.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/timecode.c b/libavutil/timecode.c
index 77d828d..5f9ebc2 100644
--- a/libavutil/timecode.c
+++ b/libavutil/timecode.c
@@ -152,8 +152,8 @@ static int check_timecode(void *log_ctx, AVTimecode *tc)
         av_log(log_ctx, AV_LOG_ERROR, "Timecode frame rate must be
specified\n");
         return AVERROR(EINVAL);
     }
-    if ((tc->flags & AV_TIMECODE_FLAG_DROPFRAME) && tc->fps != 30) {
-        av_log(log_ctx, AV_LOG_ERROR, "Drop frame is only allowed
with 30000/1001 FPS\n");
+    if ((tc->flags & AV_TIMECODE_FLAG_DROPFRAME) && tc->fps != 30 &&
tc->fps != 60) {
+        av_log(log_ctx, AV_LOG_ERROR, "Drop frame is only allowed
with 30000/1001 or 60000/1001 FPS\n");
         return AVERROR(EINVAL);
     }
     if (check_fps(tc->fps) < 0) {
-- 
1.7.10.2 (Apple Git-33)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-drop-frame-calc-for-60000-1001.patch
Type: application/octet-stream
Size: 1080 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130122/33d10e58/attachment.obj>


More information about the ffmpeg-devel mailing list