@@ -582,37 +582,34 @@ static ngx_int_t
582
582
ngx_rtmp_cmd_play2_init (ngx_rtmp_session_t * s , ngx_rtmp_header_t * h ,
583
583
ngx_chain_t * in )
584
584
{
585
- static u_char old_name [NGX_RTMP_MAX_NAME ];
586
- static u_char transition [NGX_RTMP_MAX_NAME ];
587
585
static ngx_rtmp_play_t v ;
588
586
static ngx_rtmp_close_stream_t vc ;
589
587
590
- static ngx_rtmp_amf_elt_t in_elts [] = {
591
-
592
- /* transaction is always 0 */
593
- { NGX_RTMP_AMF_NUMBER ,
594
- ngx_null_string ,
595
- NULL , 0 },
588
+ static ngx_rtmp_amf_elt_t in_obj [] = {
596
589
597
590
{ NGX_RTMP_AMF_NUMBER ,
598
- ngx_null_string ,
591
+ ngx_string ( "StartTime" ) ,
599
592
& v .start , 0 },
600
593
601
594
{ NGX_RTMP_AMF_STRING ,
602
- ngx_null_string ,
603
- & old_name , sizeof (old_name ) },
595
+ ngx_string ("StreamName" ),
596
+ & v .name , sizeof (v .name ) },
597
+ };
604
598
605
- { NGX_RTMP_AMF_STRING ,
599
+ static ngx_rtmp_amf_elt_t in_elts [] = {
600
+
601
+ /* transaction is always 0 */
602
+ { NGX_RTMP_AMF_NUMBER ,
606
603
ngx_null_string ,
607
- & v . name , sizeof ( v . name ) },
604
+ NULL , 0 },
608
605
609
- { NGX_RTMP_AMF_OPTIONAL | NGX_RTMP_AMF_NUMBER ,
606
+ { NGX_RTMP_AMF_NULL ,
610
607
ngx_null_string ,
611
- & v . duration , 0 },
608
+ NULL , 0 },
612
609
613
- { NGX_RTMP_AMF_OPTIONAL | NGX_RTMP_AMF_STRING ,
610
+ { NGX_RTMP_AMF_OBJECT ,
614
611
ngx_null_string ,
615
- & transition , sizeof (transition ) }
612
+ & in_obj , sizeof (in_obj ) }
616
613
};
617
614
618
615
ngx_memzero (& v , sizeof (v ));
@@ -626,10 +623,8 @@ ngx_rtmp_cmd_play2_init(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
626
623
ngx_rtmp_cmd_fill_args (v .name , v .args );
627
624
628
625
ngx_log_error (NGX_LOG_INFO , s -> connection -> log , 0 ,
629
- "play2: old_name='%s' name='%s' args='%s' "
630
- "start=%i duration=%i transition='%s'" ,
631
- old_name , v .name , v .args , (ngx_int_t ) v .start ,
632
- (ngx_int_t ) v .duration , transition );
626
+ "play2: name='%s' args='%s' start=%i" ,
627
+ v .name , v .args , (ngx_int_t ) v .start );
633
628
634
629
ngx_memzero (& vc , sizeof (vc ));
635
630
0 commit comments