[rtmpdump] fw 4gb file bugreport

compn tempn at mi.rr.com
Wed Jan 14 15:36:56 CET 2015


mail was sent to projects at mplayerhq.hu , so forwarding it here.

--
  Hello, When I using youtube-dl to download some video from website,I
  found that When the video file is very large like 4.48GB. RtmpDump
  will report error "ERROR: Unexpected start of file, error in tag
  sizes, couldn't arrive at prevTagSize=0" So I download the source
  file,try and try again finally the project works, and then check and
  check again ... At last I figure out what's wrong with the program.
  In the last version seems trying to fix the large file problem using
  ftello instead of ftell .But the fseek function remains the
  same ,when execute   fseek(file, 0, SEEK_END);   size =
  ftello(file);  Actually  ftello(file) returns 0 to size.Finally I
  figure out the bug is that replace all fseek with fseeko to deal with
  large file problem. Thank you for your team proving this wonderful
  software stack.

  //sunsocool
  //fseek(file, 0, SEEK_END);
  fseeko(file, 0, SEEK_END);
  size = ftello(file);

  //fseek(file, 4, SEEK_SET);
  fseeko(file, 4, SEEK_SET);
...
  // go through the file and find the last video keyframe
  do
    {
      int xread;
	skipkeyframe:
      if (size - tsize < 13)
	{
	  RTMP_Log(RTMP_LOGERROR,
	      "Unexpected start of file, error in tag sizes, couldn't
  arrive at prevTagSize=0 size(%lld) - tsize(%lld)< 13 ", size, tsize);
  return RD_FAILED; }

--


More information about the rtmpdump mailing list