I can't modify the source code libavformat/rtmpproto.c

Questions that occur when trying to compile FFmpeg.
Post Reply
blackshadow4279
Posts: 1
Joined: Mon Jul 17, 2017 9:57 am

I can't modify the source code libavformat/rtmpproto.c

Post by blackshadow4279 » Mon Jul 17, 2017 10:27 am

I need to modify libavformat/rtmpproto.c, because it severely encoded the type of publication:

Code: Select all

    ff_amf_write_string(&p, "publish");
    ff_amf_write_number(&p, ++rt->nb_invokes);
    ff_amf_write_null(&p);
    ff_amf_write_string(&p, rt->playpath);
    ff_amf_write_string(&p, "live"); this string was changed to "ff_amf_write_string(&p, "record");"
    return rtmp_send_packet(rt, &pkt, 1);  
I crosscompile for win32/64 use ffmpeg-windows-build-helpers on ubuntu 16.04. When compiling, I paused after cloning from the FFMpeg repository, then I changed the code of the file what i needed, continued to compile, the compilation was successful. I ran the newly compiled ffmpeg, and again I saw that the publication comes with a type of "live". I thought I got something wrong, and again I repeated everything and saw again the wrong type of publication. After compilation, the file rtmpproto.c remains the same as I did it (with the type of publication "record").

Help please solve this strange problem.

Post Reply
'