Ticket #693: red5-fix-ffmpeg-publish.diff

File red5-fix-ffmpeg-publish.diff, 1.2 KB (added by lsanderson, 2 years ago)

Patch

  • src/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java

     
    975975                                //get the params datatype 
    976976                                byte object = input.readDataType(); 
    977977                                log.debug("Dataframe params type: {}", object); 
    978                                 ObjectMap<Object, Object> params = (ObjectMap<Object, Object>) input.readObject(deserializer, 
    979                                                 Object.class); 
     978 
     979                Map<Object, Object> params; 
     980                if (object == DataTypes.CORE_MAP) { 
     981                    // The params are sent as a Mixed-Array.  This is needed 
     982                    // to support the RTMP publish provided by ffmpeg/xuggler 
     983                    params = (Map<Object, Object>) input.readMap(deserializer, null); 
     984                } else { 
     985                    // Read the params as a standard object 
     986                    params = (Map<Object, Object>) input.readObject(deserializer, 
     987                            Object.class); 
     988                } 
    980989                                log.debug("Dataframe: {} params: {}", onCueOrOnMeta, params.toString()); 
    981990 
    982991                                IoBuffer buf = IoBuffer.allocate(1024);